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

Auth0 doesn't gracefully handle Android process death #779

Open
6 tasks done
ahibrahimleague opened this issue Nov 19, 2024 · 0 comments
Open
6 tasks done

Auth0 doesn't gracefully handle Android process death #779

ahibrahimleague opened this issue Nov 19, 2024 · 0 comments
Labels
bug This points to a verified bug in the code

Comments

@ahibrahimleague
Copy link

ahibrahimleague commented Nov 19, 2024

Checklist

Description

We've received negative reviews from our users due to them losing the MFA code when they head to the Email app to grab the MFA code, especially in old or low-memory devices.

Digging deeper, it looks like Auth0 Login with Browser SDK doesn't gracefully handle process death scenarios for the underlying app when it is killed in the background due to Android's system kill scenario.

I'm able to reproduce the scenario in the example app, where I click Login With Browser (Async) (we're using Corotuines in our app, but I suspect it doesn't matter as it will also happen with pure callbacks API), put the app in background, simulate process death, put the app to foreground, login with the user, expected: Hello <username> Snackbar is shown, actual: nothing happens.

Reproduction

  1. Click Login in with Browser (Async)
  2. Click home to put the app to background
  3. Execute
    • adb shell am kill com.auth0.sample to simulate the Auth0 sample app system kill
  4. Put the app to foreground
  5. Login with credentials: user: [email protected], pass: 12345678aA$
  6. Login succeeds app opens, but no callbacks are invoked.

Expected: Hello [email protected] Snackbar is shown
Actual: Nothing happens

Additional context

When process death kicks in, the app's memory gets reset, which explains why we're losing the callbacks. I think though Auth0 may need to provide an API so that SDK users would recover from such situation, especially knowing that the app always receive the callback redirect URL even in process death situation, which Auth0 can grab and appropriately parse it.

Auth0.Android version

2.11.0

Android version(s)

API 33

@ahibrahimleague ahibrahimleague added the bug This points to a verified bug in the code label Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

1 participant