-
Notifications
You must be signed in to change notification settings - Fork 131
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
App state kept without client requesting it? #397
Comments
What you are describing is normal behavior. In the 1st scenario, your activity A changes to fragment C. There the user clicks a button and the authentication is started. Internally, the library will start another activity and when the authentication is received, that internally launched activity will be finished, so it goes back to whatever context started the web auth. In this case, Activity A with fragment C. This could vary if the OS decided it needed more RAM and killed your app, forcing Activity A to be recreated. In the 2nd scenario, your activity A has a button that opens B and from there you start the authentication. The same workflow is applied. An activity is started internally by this library to launch the browser. And when the result comes back, it will be finished, taking the user back to whatever context started the web auth. In this case, Activity B. All these activities that you have in your app are not part of this library, and so, are not in control of this library. The library doesn't launch any of your app's activities, it just finishes the ones the library had internally started. I hope that makes sense. |
@lbalmaceda thanks for your response 🙏 Uhmm, I am not sure I am following you 🤔 For example:
That's totally fine and makes sense, but what I am saying here is different, let's try to use a different example to see if I can explain myself better: Let's say I have an app that launches a All good till here. Now let's consider 2 scenarioa:
As you can see. the issue happens only if I close the app while on the webview activity from the SDK, which made me think something is done there, maybe some flags for the intent that keep the state of the app in some way? 🤔 Update: this seems to happen on Android 10 and 9, does not happen on Android 11 (from my tests) |
There is something definitely off here, further investigating I noticed another scenario with a weird behaviour. Suppose we have a simple app with one default activity and one fragment in it.
The app doesn't seem to crash, is just closed together with the auth0 activity. (writing this under this issue since they might be related(?)) This one happens for sure in Android 10 and 11 as well. |
Ok, found something interesting: I had the launch mode on my activity as |
That makes sense. Changing the As mentioned earlier, what we do in this library doesn't have any impact on any activity/fragment that you have in your application, as we don't have access to them. |
I'm going to close this. If you run into a different issue, please open a new one. Thanks |
Describe the problem
When closing the app while the authentication browser is open, relaunching the app starts from the screen previous to the authentication opening.
What was the expected behavior?
I was expecting to land on the usual initial screen of the app.
Reproduction
Let's say my app by default is launched on Activity A with fragment B. To launch the SDK authentication, the user needs to first go to fragment C and then click on a button that will launch the SDK login through:
If I close the app while the login (custom tabs browser) is open and then I relaunch the app, I land on the fragment C.
I was expecting to land on fragment B which is the standard behaviour of the app.
Reproduction 2
I have the same output with a similar scenario.
Let's say I have activity A and B. Activity B has an
extra
used to trigger the SDK authentication.Activity A has a button that, when clicked, sets that extra on Activity B to
true
, triggering the SDK authentication once launched.If I launch Activity A, then click on that button -> Activity B is launched and the SDK authentication (custom tabs browser) is immediately launched as expected.
If I close the app at this point (so while the custom tabs are visible) and reopen it again, I would expect to land on Activity B without the SDK authentication being triggered.
Well, the SDK authentication gets triggered (which is not what I expect)
Environment
The text was updated successfully, but these errors were encountered: