Hey Guys. I'm creating a Flutter app with Google Sign in. Set up the OAuth credentials in GCP with the redirect url from Appwrite. I'm calling the createOAuth2Session method from Account. However, it opens up a private browsing window and this does not show the existing logged in accounts for selection. I need to enter the username and password and go through the normal authentication process. What do I need to do to make sure the existing logged in accounts show up at this stage? Any help would be highly appreciated!
Below is the code:
How do you know it's a private browsing window?
It explicitly says that in the browser
This is flutter desktop? On what OS?
Flutter Macos desktop app
Maybe you had another private window opened?
I tried multiple times with this - made sure that there were no private window open. Primary browser is Safari, changed that to Chrome as well and tried. Still no change.
What happens with chrome as the default?
I was able to narrow down the issue to this piece of code. In FlutterWebAuth2.authenticate, the 'preferEphemeral' is set to 'true'. This opens up the window in private browsing and does not let me access the already signed in accounts. I tested this separately using flutter_web_auth2 package and noted the difference between setting it to true and false. However, in the below code, if I try to set 'preferEphemeral' to 'false', then I get a redirect error.
I was able to close this one by changing 'preferEphemeral' to false. We can close this. Thanks for the help.
Hey.
If your issue is solved, please add [Solved] to the beginning of the title. Thanks!
[Closed] Google sign in opens in Private Browsing
Recommended threads
- Error with realtime channels
I'm performing a subscription to realtime channels, and after a few seconds I get an exception with this error: {\"type\":\"error\",\"data\":{\"code\":1008,\"me...
- Which flutter SDK version for Self Hoste...
Hi all, Is there a good way to figure out which version of flutter SDK and Dart SDK is current for latest available self-hosted 1.8.0 ? I know new features are...
- redirect_uri errors on flutter client
Hi all, I'm using the flutter client for my app to do appwrite auth and use the JWTs to send to my backend. When I try to sign in with SSO, I get this: https:/...