Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS-FaceID Popup prevents In-App browser from opening #584

Open
g-feil opened this issue Jan 7, 2025 · 2 comments
Open

iOS-FaceID Popup prevents In-App browser from opening #584

g-feil opened this issue Jan 7, 2025 · 2 comments

Comments

@g-feil
Copy link

g-feil commented Jan 7, 2025

Hello, we have come across a pretty rare bug, which I was able to reproduce in this repo: https://github.com/g-feil/flutterappauthbug

We are using flutter_appauth in combination with local_auth for biometric authentification. In a very specific case (which by design should not occur in our app, but it did), the FaceID Popup prevents the correct execution of authorizeAndExchangeCode. This is also shown in the attached video. We are using Ephemeral Session, the error occurs only on iOS.

LoginApp.mov

Reproduction as provided in code:

  1. Authenticate with biometrics using local_auth
  2. Confirm Biometrics (FaceID in our case)
  3. A small popup is seen for a few seconds, then the login page closes. (Tr: "App wants to use ... to sign in")

Why does this happen?
The callback of the local_auth authenticate gets called as soon as the user confirms. However iOS still plays an animation, that shows the confirmation (the face converts into a tick). The flutter code reaches authorizeAndExchangeCode while the animation is playing, and therefore this weird behavior occurs.

We were able to fix this issue by hardcoding a delay of 1.5 seconds, which is not optimal.
I don't think the local_auth package can fix this, because I have read in some forums, that this callback also gets executed early in native, but I'm not a pro in this area. The small popup in Step 3 leads me to think, that this case is interesting for the app_auth package.

Thanks for looking into this!

@PhenixZeller
Copy link

We have the same Issue also using Biometrics with the local_auth package.

1 similar comment
@PhenixZeller
Copy link

We have the same Issue also using Biometrics with the local_auth package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants