Skip to content
Back

OAuth Browser Popup doesn't close

  • 0
  • 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 login session is created using Dart code. AndroidManifest is properly configured to handle the login callback. The issue causing the browser popup to not close after OAuth login is likely related to the handling of the callback activity. Double-check the callback handling logic or implement a method to close the popup after successful login.
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 )
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