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

In AuthenticationActivity intent flag CLEAR_TOP will close previous Activities with Launcher set to singleTask #719

Open
6 tasks done
cooperkong opened this issue Mar 14, 2024 · 1 comment
Labels
bug This points to a verified bug in the code

Comments

@cooperkong
Copy link

cooperkong commented Mar 14, 2024

Checklist

Description

This issue can be repdocued by thie repo
https://github.com/cooperkong/auth0-issue

Reproduction

  1. launch app
  2. click on button to launch Auth0 login page
  3. click Home button to close app
  4. re-launch again from launcher
  5. click on button to launch Auth0 login page will cause the app to close

Additional context

Hi Auth- team, I understand there might be a need to CLEAR_TOP when launching AuthenticationActivity but in the example provided, it has unpexpected behaviour.
My suggestion would be

  • if it's possible to have an API to specify what intent flag we would pass in to Auth0
  • or clean up CustomTabs as soon as the user leaves web auth (background, click on Home, etc..)
    essentially what I mean is to move this bit of logic into perhaps onStop
        val resultMissing = authenticationIntent.data == null
        if (resultMissing) {
            setResult(RESULT_CANCELED)
        }
        deliverAuthenticationResult(authenticationIntent)
        finish()

Auth0.Android version

2.10.2

Android version(s)

12

@cooperkong cooperkong added the bug This points to a verified bug in the code label Mar 14, 2024
@cooperkong
Copy link
Author

cooperkong commented Mar 14, 2024

Here is also a video to reproduce this issue.
3.webm

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