Back

iOS Safari browser issue on Flutter Web GetSession session after sign in Google

  • 0
  • Flutter
  • Web
  • Cloud
Patrick Lee
5 Mar, 2024, 07:04

I am using the Flutter Web to develop on my web site to login account on Appwrite cloud.  On my web site, it will be signed in Google using CreateOAuth2Session and run getSession(current).  However it is failed to get the Session and return "error with code 401" on iOS Safari or Chrome browser only.  The strange thing is that it is working fine on the Android Chrome browser, Microsoft Windows 11 OS Edge and Chrome browser.  I can get the Session with the provide "Google".  So I believe my flutter code are fine.  Anyone can help me to troubleshooting on iOS browser?

TL;DR
Developers experiencing issue with Flutter web on iOS Safari not detecting Google session after sign-in. Works fine on Android and Windows devices. iOS browser shows unauthorized error, even though Appwrite Cloud Auth page shows iOS login session. Looking for help troubleshooting on iOS browsers. Solution: - Check for any errors in the console when running the code on Mac or PC to identify login process issues. - Verify Flutter code for signing in with Google using CreateOAuth2Session and running getSession(current) on iOS browsers.
darShan
5 Mar, 2024, 07:07

401 means unauthorised, either the user didn't login or something went wrong during the login process. Anything in the dev. console if you try on a mac or a pc?

Patrick Lee
5 Mar, 2024, 07:24

For Android, Windows device, everything is fine. It can get Google session.

But in iOS browsers, it is detected unauthorized. However when I checked the Appwrite Cloud website - Auth sessions. I can see my iOS login in Appwrite cloud Auth page session. It is showing “Mobile Safari 17.3 on iOS 17.3”.

I don’t know why my web page on iOS browser can’t detect (run getSession(current) code) Google session.

Faye
5 Mar, 2024, 07:36
Patrick Lee
5 Mar, 2024, 08:02

I am using Flutter dart language to develop webpage. That article looks like using Apple Swift language and wrote iOS app.

It is not the same issue.

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