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
- Student plan issue
I am using GitHub student plan, I even got access to appwrite's mock phone number. but when I try to use it, it says the phone number limit has reached
- Getting "The current user has been block...
So today I want to deploy something to Appwrite but when I click Sign in with Github, it's redirect me to login site and in the url bar I see this `?error=%7B"m...
- listRows result parsing issue
I'm using Appwrite Dart SDK "24.2.0". When I perform a listRows call in dart, I have this reponse in JSON: in " Future<models.RowList> listRows()" { "total" :...