# React-native-auth0: can't clearSession on Android device

**URL:** <https://community.auth0.com/t/react-native-auth0-cant-clearsession-on-android-device/201407>\
**Category:** Get Help\
**Tags:** classic-universal-login-experience, login-experience\
**Created:** [July 6, 2026, 2:22am UTC](https://community.auth0.com/t/react-native-auth0-cant-clearsession-on-android-device/201407 "2026-07-06T02:22:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike.wang](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/mike.wang/32/71179_2.png) [@mike.wang](https://community.auth0.com/u/mike.wang)\
**Post date:** [July 6, 2026, 2:22am UTC](https://community.auth0.com/t/react-native-auth0-cant-clearsession-on-android-device/201407/1 "2026-07-06T02:22:06Z")

</div>

I’m use “react-native-auth0”: “5.6.0”

I had this issue:

Precondition:

- Android
- Login in by SSO (SAML)

How to reproduce this issue?

1, sign in auth0 by SAML (Microsoft) j—io

2, app enters Home Page, then kill the app

3, click sign in button, then input a random email like [123@company.io](mailto:123@company.io)

Then I can sign in previous j—io without inputing the password.

So I want to clearSession before every login, I tried all ways below, but all didn’t work. I can still sign in previous user without inputing the password

1, auth0.webAuth.clearSession({ federated: true })

2, auth0.webAuth.clearSession({}, { useLegacyCallbackUrl: true });

3, auth0.webAuth.clearSession(

```
    { federated: true, returnToUrl: Config.AUTH0_ANDROID_CALLBACK_URL },

    { customScheme: scheme },

  );

```

Anyone can help, please?

---

<div class="post-metadata">

**Author:** ![gerald.czifra](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/gerald.czifra/32/75301_2.png) [@gerald.czifra](https://community.auth0.com/u/gerald.czifra)\
**Post date:** [July 6, 2026, 10:45pm UTC](https://community.auth0.com/t/react-native-auth0-cant-clearsession-on-android-device/201407/2 "2026-07-06T22:45:34Z")

</div>

Hi @mike.wang

Welcome to the Auth0 Community!

I understand that after using `clearSession` and trying to login again, even as a different user, the previous session is not fully removed and you are logged in as the initial user.

This behaviour is caused by the browser retaining the session cookie and the external IdP not terminating it’s session. If a new login request is being made during this time, the active session is retained and used to complete the authentication.

Instead of relying solely on `clearSession` to manage the browser state, pass `prompt: 'login'` when calling the `/authorize` endpoint, when the user clicks the sign-in button. This tells Auth0 (and subsequently the IdP) to ignore the existing SSO cookie and force the user to re-authenticate. When `prompt=login` is used, the user is forced to log in irrespective of whether a valid session exists or not.

Allow me to share some useful resources on this matter:

- [How do I force a user to login again?](https://community.auth0.com/t/how-do-i-force-a-user-to-login-again/107572);
- [Force Reauthentication in OIDC - Auth0 Docs](https://auth0.com/docs/authenticate/login/max-age-reauthentication#:~:text=The-,prompt%3Dlogin,-mechanism%20can%20be).

Please let us know if this helped solve the issue on your end!

Best regards,  
Gerald
