Description: I’m using Appwrite with Flutter for Google OAuth login. The authentication flow works fine on iOS and the browser, but on Android devices, after a successful Google sign-in, the redirection back to the app is not working as expected.
Details:
Platform: Flutter (latest), Appwrite SDK (latest)
Login Method: account.createOAuth2Session(provider: 'google',) Behavior on iOS: Works correctly, user is redirected back to the app and the session is created. Behavior on Android: Google login succeeds, but after consent, the redirect does not return to the app. Instead, it either hangs or stays on the browser. Expected Behavior: On success, the user should be redirected back to the app with the session established.
Tried:
- Updated AndroidManifest intent filter for redirect URL.
- <!-- Add this inside the <application> tag, along side the existing <activity> tags --> <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>*
- Ensured redirect URL matches in Appwrite console and app config.
- Looking for guidance or examples on fixing the Android OAuth redirection issue for Appwrite + Flutter.
Recommended threads
- How to determine if a user is anonymous?
This is probably a silly question, but I have not yet found a good answer. Is there a method to determine if the current session is anonymous aside from seein...
- Anonymous Sessions using Node SDKs
I am attempting to use anonymous sessions with the Node SDK but I have simply no idea how to persist the session to a cookie, pass it to the session client, etc...
- Auth working for emulator but not for ph...
hey guys i'm using appwrite for expo react native it is working perfectly for emulator but does not working for physical devices can u explain any one and it is...