Back

ssr login with oauth2

  • 0
  • Auth
  • Web
  • Cloud
Mahmood
1 Sep, 2024, 21:34

I have written a code for ssr login with oauth2 by google and github. Everything is fine, but after few hours the session is terminated automatically

TL;DR
Developers are experiencing an issue with the cookie expiration time in an SSR login with OAuth2. The cookie is being automatically removed after being set correctly during login. The developers have tested on multiple browsers like Brave and Kiwi. There seems to be confusion over the session length and settings in the console. Make sure to set the session length to something longer than a few hours in the Auth settings.
D5
1 Sep, 2024, 22:41

You can set session length in the console Auth settings. Do you have set that to something superior to some hours?

Mahmood
2 Sep, 2024, 04:42

No I didn't touch it The default is set to 365 days

Mahmood
2 Sep, 2024, 08:41

There isn't any cookie for my website in the browser Why have it removed 🤔

D5
2 Sep, 2024, 09:51

Are you using the appwrite SDK?

Mahmood
2 Sep, 2024, 10:09

Yes, But with solidstart

Mahmood
2 Sep, 2024, 10:17

When the user logs in, the cookie is set correctly and exists in the browser, but it is removed automatically later. I have tested it on different phones using multiple browsers based on chromium like brave and kiwi

Asutosh
2 Sep, 2024, 11:00

Once the cookie is set can you pls check the expiration time?

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