Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Open
Assignees
Labels
bugSomething isn't working questionFurther information is requested
@TanmayOG

Description

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

Metadata

Metadata

Labels

bugSomething isn't working questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /