Skip to content
Back

OAuth Browser Popup doesn't close

  • 0
  • 5
  • Flutter
  • Auth
  • Cloud
M4dhav
13 Nov, 2025, 11:31

after OAuth the browser popup doesnt close but the user is logged in, what could be the issue?

TL;DR
OAuth Browser Popup doesn't close. Fix the issue by using the dependency override `flutter_web_auth_2: ^5.0.0-alpha.3`. Additionally, consider waiting for a GA release of version 5.
M4dhav
13 Nov, 2025, 11:34

login session is created using:

TypeScript
await account.createOAuth2Session(provider: OAuthProvider.google);

AndroidManifest is configured properly:

TypeScript
<activity android:exported="true" android:name="com.linusu.flutter_web_auth_2.CallbackActivity">
            <intent-filter android:label="flutter_web_auth_2">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="appwrite-callback-${PROJECT_ID}" />
            </intent-filter>
        </activity>

Project ID is in this form as it gets injected during a CI/CD Workflow, and it is added to manifestPlaceholders by the Gradle Build:

TypeScript
val projectId: String = System.getenv("APPWRITE_PROJECT_ID") 
manifestPlaceholders += mapOf( "PROJECT_ID" to projectId )
13 Nov, 2025, 12:48

Hey <@452316113016193024> I'm sorry for the tag but I really need some help with this, I'm waiting on this to push an update to my app so users can login with OAuth, which is currently broken.

13 Nov, 2025, 14:38

Seems to be a transitive issue from flutter_web_auth_2, fixed by using

TypeScript
dependency_overrides: 
  flutter_web_auth_2: ^5.0.0-alpha.3
13 Nov, 2025, 14:50

<@1087889306208718959> <@462046107556511744> You guys might wanna take a look at this

13 Nov, 2025, 14:54

I see. I will raise a PR to fix this

1
13 Nov, 2025, 14:55

Well. Do if you prefer or want! πŸ˜…

13 Nov, 2025, 14:55

flutter_web_auth_2 is changing the method of authenticating on Android completely in v5

13 Nov, 2025, 14:55

There are no breaking changes though

13 Nov, 2025, 14:55

Sure, could you please point me to the repo? The flutter sdk repo seems to be read only

13 Nov, 2025, 15:06

Since the version I used is still in alpha and v5 as a whole is still in Alpha, maybe it would be better to wait for a GA release? Upto you guys how you wanna handle this, but maybe another potential solution can be adding to the documentation temporarily to use a dependency override if someone faces an issue.

The reason I propose this alternate approach is, if someone has an issue with the alpha then they will be confused.

13 Nov, 2025, 15:06

Although that is unlikely

13 Nov, 2025, 15:06

Thank You

13 Nov, 2025, 15:12

It's critical. Better using alpha

1
13 Nov, 2025, 15:19

https://github.com/appwrite/sdk-generator/pull/1254

Here you go. Thanks for the oppurtunity!

13 Nov, 2025, 15:57

Pinging the boss <@743532656767270934> 🫑

1
13 Nov, 2025, 15:59

Looks good to me

13 Nov, 2025, 16:00

I will test it after my internet is fixed πŸ˜…

1
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