I came across this thread that is titled: Android SDK: User keeps logged in after uninstalling and reinstalling the app], where it’s mentioned that authentication is invoked via a web-based approach.
I have a question regarding this: is it possible to manually clear the Auth0 session cookies in the browser on Android before initiating a login?
This relates to scenarios where, as described, a user uninstalls the app and then reinstalls it.
Currently, my implementation always performs an Auth0 logout before logging in again. However, I’d like to skip the logout step and instead manually clear the cookies. Is this achievable?
You can also attempt to redirect the user to your /logout or /logout?federated when invoking the logout function in your application. Alternatively, you can set your tokens to expire sooner, however this might not be ideal for your use case.
Otherwise, I believe the Android SDK does not offer to clear the browser cookies directly at this time. You can raise an inquiry with the SDK team on the GitHub repository if necessary regarding the matter.
If you have any extra questions or the articles above were of any help, do not hesitate to let us know and leave a reply on the post.
Hello,
Yes, it is possible to manually clear Auth0 session cookies in the browser on Android before initiating a login. You can achieve this by deleting the cookies associated with the Auth0 domain in your browser settings. Your Texas Benefitsi Learn
In regards to @jack598henry statement, I do not believe there is a way to clear the session cookies which are managed by user’s browser. You can refer to this Knowledge Article in regards to the issue that you are facing.
The article addresses the use of WebAuthProvider.logout() function prior to the login one. I understand that you already have a similar approach however, without manually deleting the cookies from the browser, what you are looking for is not achievable using Android SDK since it is an expected behaviour.
In regards to your other question, you can review our documentation about Product Support Matrix, however, to ease your review, Auth0 has the following support for browsers:
Authentication Desktop Browsers
Browser
Support Level
Chrome
Supported
Safari
Sustained
Internet Explorer (v10/11)
Sustained*
Edge
Sustained
Firefox
Sustained
Authentication Mobile Browsers
Browser
Support Level
Safari iOS 10+
Supported
Chrome for Android 7.1.1+
Supported
If you have any further questions on the matter, feel free to leave another reply on the post. I hope the information above was helpful!