Skip to content
Back

Google Auth screen not closing after authentication

  • 0
  • Flutter
  • Auth
  • Cloud
OG
16 Oct, 2024, 14:20

I'm experiencing two issues with the Google authentication flow using Appwrite SDK (v13.0.0) in my Flutter app (SDK v3.5.3). Google Auth screen not closing After successfully authenticating with Google, the authorization screen does not close, leaving the user stuck. Environment: Flutter SDK: ^3.5.3 Appwrite SDK: ^13.0.0 OS: Windows 11 Testing Device: Android 14

Future<void> googleAuth() async { try { await AppwriteService.account.createOAuth2Session( provider: OAuthProvider.google, ); loadUser(); } on AppwriteException catch (e) { handleAppwriteException(e); } catch (e) { print('An unexpected error occurred: $e'); } }

<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>

TL;DR
Google Auth screen does not close after authentication in Flutter app using Appwrite SDK. Ensure the 'CallbackActivity' in the AndroidManifest.xml has the correct intent-filter configuration.
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