Back

[SOLVED] OAuth doesn't register session on mobile browsers

  • 0
  • Users
  • Accounts
  • Web
nero125
29 Mar, 2023, 00:26

Hello, I am trying to implement Github and Google oauth on our community portal (https://angular.jscebu.org). While on PC browsers, the oauth works correctly, however, when logging in from a mobile browser (Firefox/Chrome on Android), it seems that the session doesn't persist.

I also tried logging in with email and password and it seems to be working fine.

Would like to ask your help if I miss anything.

Thank you so much.

TL;DR
OAuth login works fine on PC browsers but not on mobile browsers. Session doesn't persist. Solution: Ensure that the front end and appwrite share the same base domain. Add a custom domain to the project for full compatibility.
Drake
29 Mar, 2023, 00:29

some browsers are particular about cookies. To ensure full compatibility, it's best for your front end and appwrite to share the same base domain. I would suggest adding a custom domain to your project and having it be something like appwrite.jscebu.org or appwrite.angular.jscebu.org. For docs on custom domains, see https://appwrite.io/docs/custom-domains

nero125
29 Mar, 2023, 00:34

Thanks Steven, wondering about this too. I'll share my further findings on this one.

nero125
29 Mar, 2023, 00:46

Login works now with appwrite served on same domain. Thanks Steven.

Drake
29 Mar, 2023, 00:48

[SOLVED] OAuth doesn't register session on mobile browsers

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