question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Login process gets interrupted when using the home button to switch apps

See original GitHub 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:

reactNativeAuthorize({
  issuer: BASE_API_URL,
  clientId: "our-client-id",
  redirectUrl: "ourapp://callback",
  scopes: ["offline", "openid", "create:payments", "read:accounts"]
});

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

2reactions
agologancommented, Jan 26, 2021

You are not the first dev describing something similar #480 . Unfortunately it’s not something we can replicate. Is there a particular OS vendor, launcher combo giving you this issue or is it consistent across the board?

On Android when backgrounding an app the activity may be destroyed but in testing this state restoration works fine. The app resources are only collected if you’re lacking available memory so switching to a 2FA app and back shouldn’t trigger this behavior (unless you’ve enabled a developer flag that doesn’t keep your activities)

If this is not your case then the only other explanation is around how your app operates. Quickly looking at the reactive native module there doesn’t seem any issue with the implementation. At most you should see a browser refresh when coming back if any.

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.

0reactions
agologancommented, Jun 7, 2021

Took me a while to get back to this and I’m happy I did as I wasn’t aware of this issue. Closing as it seems there is nothing further to discuss at this point in time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix 'Transfer Interrupted' Issue When Using Move to iOS
Fix 6: Disallow Apps Running in the Background​​ Apps operating in the background might overburden your phone's CPU and lead it to perform...
Read more >
Move To iOS app transfer error solutions - Apple Community
Hi, if you're like me and bought your not-so-tech-saavy parent an iPhone and want to transfer their data from their Android phone to...
Read more >
Fixed: Move to iOS Transfer Interrupted - 5 Useful Solutions
This is one of the most effective ways to fix the Move to iOS transfer interrupted issue. This method is used when the...
Read more >
[Fixed 2022] Move to iOS Transfer Interrupted? 6 Ways Here
Seems a very common and simple thing to do, but sometimes, the solution is hidden in just looking out for the strength of...
Read more >
Move to iOS Not Working? Here Is the Fix! - YouTube
If Move to iOS is not working on your Android or iPhone, learn what to do in this video. Free download for iCareFone...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found