Skip to content

馃悰 Bug Report: Google Auth screen not closing after authentication#220

Description

@TanmayOG

馃憻 Reproduction steps

  1. Run the app on an Android 14 device.
  2. Initiate the Google authentication flow using the googleAuth() function.
  3. Complete the authentication process.

Dart Code:

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');
  }
}

XML:

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

馃憤 Expected behavior

  • The authorization screen should close automatically after successful authentication.

  • User creation with OAuth should succeed without any errors.

馃憥 Actual Behavior

  1. The Google authorization screen remains open after authentication, requiring manual closure.

  2. The AppwriteException document_invalid_structure is thrown with the message:

Error creating user with OAuth: AppwriteException: document_invalid_structure,
Invalid document structure: Unknown attribute: "userId" (400)

馃幉 Appwrite version

Version 2.0.x

馃捇 Operating system

Windows

馃П Your Environment

  • Flutter SDK: ^3.5.3
  • Appwrite SDK: ^13.0.0
  • OS: Windows 11
  • Testing Device: Android 14

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions