
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
- Flutter OAuth2 Google does not return to...
When the flow starts, the browser opens, I select an account, and it keeps showing: """ Page not found The page you're looking for doesn't exist. `general_rout...
- Redirect URL sends HTTP instead of HTTPS...
I am not sure since when this issue is present, but my Google and Apple redirect URI are no longer pointing to the HTTPS redirect URI when I try to use OAuth. ...
- Failing to run document operations on sd...
Could someone point me in the right direction I'm going in cirlces. I have a problem with sdks and my self-hosted server in production (for ~3 years) I have bee...
