-
Notifications
You must be signed in to change notification settings - Fork 887
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
Login process gets interrupted when using the home button to switch apps #637
Comments
You are not the first dev describing something similar #480 . Unfortunately it's not something we can replicate. On Android when backgrounding an app the activity may be destroyed but in testing this state restoration works fine. If this is not your case then the only other explanation is around how your app operates. Also please note you'll need to update the lib version inside the reactive native module uses to something closer to top of tree via https://jitpack.io/#openid/AppAuth-Android to make it work on the latest OS versions. |
Thanks for the comprehensive reply! The issue seems to be consistent across the board, I'm currently trying to get a list of devices and launchers, but getting this information from users or from our limited pool of production capable testers is difficult. Replicating the issue requires an actual production account and personal bank accounts. So far I only know that this happens on one device with OnePlus 7 Pro, Android 10, Nova launcher. We have now confirmed that we've been using the latest 0.7.1 version of the AppAuth-Android library. |
Unfortunately 0.7.1 "is not the latest" and there are have been some changes since then. If you can replicate the issue I recommend grabbing a newer version and test if that resolves your use-case. |
We investigated the issue on our end, and the issue is not related to Auth library, but android in general: https://issuetracker.google.com/issues/36907463 Solution: AndroidManifest.xml: MainActivity.java
The fix works in most of the cases except when the app is opened from an unusual source (Android studio, react-native start, Google play, etc.). In that case, using home screen icon to return to the app will cause extra activity on top of the stack. For that, I recommend closing either the activity or the app completely. After restart, the app is authenticated and everything works. |
Took me a while to get back to this and I'm happy I did as I wasn't aware of this issue. |
ISSUE CASE 1
Case 2 here
General info
In our React Native project, we use the the
react-native-app-auth
version 6.0.2. We begin the authorization process with something like the following:This opens a login flow in browser. As a part of the login flow, the user will be redirected to the login page of their chosen bank account. Most banks nowadays require the use of a separate login app which means that in order to complete the login flow the user must leave our application, open the separate login app, enter their PIN code or use finger print recognition and navigate back to our application.
The flow works well on iPhone. It usually works well on Android, but we have noticed two cases where the login process repeatedly fails with a consistent outcome when following certain steps.
Case 1
When the user navigates to the login app by using the Android home key instead of the app switcher key, this causes the login flow to get canceled. When returning back to the application, the user is faced with a login cancelation popup.
We are wondering if this is something inherent to Android that we should just communicate better to our users (effectively tell them not to use the home button during login) or if this could be fixed either to this library or to our login process.
The text was updated successfully, but these errors were encountered: