How to set up multiple Memberstack logins on one website using reverse proxy while preserving session continuity? Answered

If I use a reverse proxy to merge two websites. Can the login work across the two? And obviously, not logging them out in between pages

Comments

5 comments

  • Comment author
    Jayess

    Hello Cameron šŸ‘‹šŸ¼

    I believe we use localStorage to save the login information. I’m not really sure I know what reverse proxy is but maybe Josh Lopez or Chukwudi Onyekwere or Nicolas Scott has an answer to this.

    Even if with subdomains currently, they need to log in twice, but it might be different with React?

    0
  • Comment author
    Nicolas Scott

    No, you'd need to use SSO with our OIDC config, but keep in mind you'll not be able to use any of our client side APIs since the session is different

    0
  • Comment author
    Cameron Bensimon

    Nicolas Scott okay thanks for letting me know

    0
  • Comment author
    Shawna Jones

    Is it possible to have two separate login forms on one website, each connected to a separate Memberstack account?

    Example:

    • We have our primary website. (www.website.com)
    • And we have a Member Portal behind a login (members managed through Memberstack account A) www.website.com/memberportal
    • Now, we sister project that offers a paid dashboard service to their separate members. They are hoping to embed their dashboard widget in a new page on our site. www.website.com/dashbaord (Members managed through Memberstack account B)

    Is this possible? Please let me know if that is not clear. Thank you in advance!

    0
  • Comment author
    Raquel Lopez

    Uhm... the last part is not that clear to me.

    So in summary, you have two sites, each with a memberstack project. You want to offer to usersA, the service of users B? Is it? But in the same page... Might I ask is there a problem with redirection from websiteA to websiteB?

    Internally, the user sessions are handled in the browser by domain, so I wouldn't recommend to use the same domain for two memberstack projects. You could perfectly use subdomains for that.

    You could try to embed the websiteB page in your websiteA project with an iframe, but it's tricky, specially if your sites have different domains, because the browsers sometimes block cross domain requests for privacy concerns.

    0

Please sign in to leave a comment.