
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
- Appwrite isn't accepting the api from se...
Error creating user: AppwriteException: Server Error type: 'general_unknown', response: '{"message":"Server Error","code":500,"type":"general_unknown","versi...
- Subject: Request for temporary quota lif...
Hi Appwrite Team, our nonprofit animal rescue app on Appwrite Cloud is currently throttled due to read‑quota limits, and we need a temporary increase so rescue ...
- Type String is not a subtype of type int...
In flutter using appwrite: ^17.1.0, ```DocumentList response = await databases!.listDocuments( databaseId: "xxx", collectionId: "xxx", ...
