Back

Next.js app not being able to access Appwrite cloud on mobile only.

  • 0
  • Web
  • Cloud
Siko
30 Sep, 2024, 23:40

I've been having this issue where my production build is working and can access the appwrite cloud instance no matter the browser or machine but when it comes to mobile I'm having issues. When I click on "Sign in with Google" button for the 0auth2 provider on the landing page it loads for a second but then redirects me to the login screen indicating a failure. I check the console log and this is the error I get. Not sure why it's happening only on mobile, perhaps stricter local storage/cookie policies? I'm using jwt authentication for this for context.

I thought it may be a CORS issue but then why is desktop working fine I don't know. Has to be a session issue maybe. Also is there a way to see access logs on cloud console? Like if there are any errors it can describe in more detail.

TL;DR
Next.js app works on desktop but not on mobile when trying to access Appwrite cloud through Google sign-in. Error suggests possible local storage/cookie policy issues causing OAuth2 failure. Check CORS settings and session management. To view detailed error logs, access logs on cloud console.
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