appwrite / appwrite/sdk-for-flutter
🐛 Bug Report: Google Auth screen not closing after authentication
- Dominant language
- Dart
- Stars
- 418
- Forks
- 150
- Avg merge
- 1h 23m
- Merged PRs (30d)
- 3
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:
```dart
Future 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:
```xml
```
### 👍 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?
- [x] I checked and didn't find similar issue
### 🏢 Have you read the Code of Conduct?
- [x] I have read the [Code of Conduct](https://github.com/appwrite/appwrite/blob/HEAD/CODE_OF_CONDUCT.md)
Contributor guide
Assessment
This issue has not been assessed yet.