Back

Move user logged in between sites.

  • 0
  • Self Hosted
  • Web
  • Cloud
ThisIsStep2
16 Mar, 2024, 13:06

Hey !

I got a user logged-in in SITE_1, i save in a session the session.secret. I wish for some cases, to send the logged user to SITE_2 and keep him logged in.

Does it makes sense to redirect him, generating JWT token, that SITE_2 should get, and validate? The problem now is that the JWT token will expire in 15 minutes, so i need to get the session.secret again to keep the user logged in. How can i achieve this ?

Both SITE_1 and SITE_2 are using the same projectId. and appwrite endpoint I currently test on Self hosted, but just because the cloud is still not V 1.5. i use node.js (Remix)

Thanks!

TL;DR
Move a logged-in user between sites. Developers need to redirect the user with a JWT token to SITE_2 and validate it. To keep the userlogged in, refresh the **session.secret** for SITE_2 as needed. Both sites should use the same projectId and appwrite endpoint.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more