-
Notifications
You must be signed in to change notification settings - Fork 149
Open
appwrite/sdk-generator
#1263Labels
bugSomething isn't workingSomething isn't working
Description
👟 Reproduction steps
Requirements
- Google Account with an activated 2FA (two-factor-authentication) option
- An android device which is logged into the same google account
- appwrite project with Google OAuth setup
Reproduction
- Enable Google 2FA and make sure you are using an android device
- Login into your google account through
createOAuth2Session(provider: "google") - You switch to your 2FA application
- After confirming your 2FA, the login window is automatically closed but you're not logged in
Further information
Article how to add Google 2FA to your account: https://support.google.com/accounts/answer/185839
I've created a minimal reproduction repository:
https://gitlab.com/metalwings/appwrite-flutter-oauth2-demo
In my case the default "is this you?" screen is automatically shown by android as soon as I try to login into my account.
👍 Expected behavior
Switching to any authenticator app doesn't break the login flow.
Users should be able to switch to other app (in my case the default android auth by google, check my 2FA Code (or press "that's me") and login after I've completed the 2FA flow
👎 Actual Behavior
The login flow is cancelled due to loss of app focus.
An exception is thrown:
E/flutter ( 6554): [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(CANCELED, User canceled login, null, null)
E/flutter ( 6554): #0 StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:652:7)
E/flutter ( 6554): #1 MethodChannel._invokeMethod (package:flutter/src/services/platform_channel.dart:310:18)
E/flutter ( 6554): <asynchronous suspension>
E/flutter ( 6554): #2 FlutterWebAuth2MethodChannel.authenticate
(package:flutter_web_auth_2_platform_interface/method_channel/method_channel_flutter_web_auth_2.dart:16:7)
🎲 Appwrite version
Version 2.0.x
Appwrite Cloud
SDK Version 11
💻 Operating system
Linux
🧱 Your Environment
Problem can be reproduced in the appwrite cloud version
👀 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?
- I have read the Code of Conduct
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working