Best way to handle returnTo and logout from main site?
-
I’m using NodeBB on community.swimstandards.com, and my main site is on swimstandards.com.
I’d like to reuse NodeBB’s login system for my main site using the session sharing plugin, so users log in once through NodeBB and gain access to features on main site.
-
When users click “Login” or “Register” on the main site, I redirect them to NodeBB. I want them to return to the original page afterward. Right now I save the returnTo URL in sessionStorage and use JS on the NodeBB side to redirect them back after login. Is there a better/native way to handle this in NodeBB?
-
For logout: I’d like to let users log out from main with a single button. Posting to /logout on the community site doesn’t seem to be working. What is the best workaround?
Thanks for any help!
-
-