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
- Apple OAuth Scopes
Hi Hi, I've configured sign in with apple and this is the response i'm getting from apple once i've signed in. I cant find anywhere I set scopes. I remember se...
- Sign In With Apple OAuth Help
Hi All! I've got a flutter & appwrite app which Im trying to use sign in with apple for. I already have sign in with google working and the function is the sam...
- [SOLVED] OAuth With Google & Flutter
Hi all, I'm trying to sign in with google and it all goes swimmingly until the call back. I get a new user created on the appwrite dashboard however the flutte...