# Logging in after logout does not re-prompt for email and password

**URL:** <https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653>\
**Category:** Get Help\
**Tags:** login-experience, new-universal-login-experience\
**Created:** [January 21, 2025, 10:29pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653 "2025-01-21T22:29:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![capndave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/capndave/32/60163_2.png) [@capndave](https://community.auth0.com/u/capndave)\
**Post date:** [January 21, 2025, 10:29pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/1 "2025-01-21T22:29:38Z")

</div>

Our app is configured to first prompt a user for email and password, then the organization. Everything seems to work. When the user wants to log off from our app, we use the `useAuth0` React hook to fetch the access token, id token hint, and call the oidc logout url. We also clear any local storage entries (where our info auth0 goodies are stored) with the name “@@auth0…” in them. Our app then redirects to an Auth0 route, which in turn redirects back to our app to start the login process again. When THAT happens, the user is only prompted to perform their 2nd-factor identification (email, sms, passkey, etc) but not to enter their username, password, or organization. How can I configure/change my app to do so?

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 21, 2025, 11:18pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/3 "2025-01-21T23:18:00Z")

</div>

Hi @capndave,

I have checked your tenant logs and did not find any log out events. Because of this, I’m unsure if the user was logged out correctly.

Have you ensured that you called the logout URL like the following example:

```auto
https://{yourDomain}/oidc/logout?id_token_hint={yourIdToken}&post_logout_redirect_uri={yourCallbackUrl}

```

I have confirmed that you enabled **RP-Initiated Logout End Session Endpoint Discovery** option in your tenant advanced settings.

It might be worth opening your network activity to be certain that the logout request is happening. And you could also try the [`/v2/logout`](https://auth0.com/docs/api/authentication#auth0-logout) endpoint.

Thanks,  
Rueben

---

<div class="post-metadata">

**Author:** ![capndave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/capndave/32/60163_2.png) [@capndave](https://community.auth0.com/u/capndave)\
**Post date:** [January 22, 2025, 7:18pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/4 "2025-01-22T19:18:36Z")

</div>

My request does look like your example. I’m worried that perhaps the `id_token_hint` I’m sending is wrong, even though the request redirects the user. Is the below code correct for extracting the `id_token_hint` using the `useAuth0` hook in React? Should I be passing the `_raw` value, the entire id\_token object, or something else?  
`const idTokenHint = (await auth0.getIdTokenClaims()).__raw;`

---

<div class="post-metadata">

**Author:** ![capndave](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/capndave/32/60163_2.png) [@capndave](https://community.auth0.com/u/capndave)\
**Post date:** [January 22, 2025, 7:52pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/5 "2025-01-22T19:52:10Z")

</div>

@rueben.tiow I was making an http call to that endpoint rather than redirecting to it! Everything seems to be working now. For anyone else looking at this, you can do this easily with the `logout` method from the useAuth0 hook

---

<div class="post-metadata">

**Author:** ![rueben.tiow](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/rueben.tiow/32/11646_2.png) [@rueben.tiow](https://community.auth0.com/u/rueben.tiow)\
**Post date:** [January 22, 2025, 7:53pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/6 "2025-01-22T19:53:42Z")

</div>

Hi @capndave,

Thanks for the follow-up and I’m glad it’s working now! 🙌

Yes, that is correct. Calling the `getIdTokenClaims` method allows you to retrieve the raw ID token by accessing it through the `__raw` property. By calling `await auth0.getIdTokenClaims()`, you can access the ID token and extract it to use as the `id_token_hint`.

You could also verify this by taking the ID token and decoding it in [jwt.io](http://jwt.io). And that’s correct, the `logout` method from the useAuth0 hook will accomplish the same.

Let us know if there’s anything else we can do to help.

Cheers,  
Rueben

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [February 5, 2025, 7:53pm UTC](https://community.auth0.com/t/logging-in-after-logout-does-not-re-prompt-for-email-and-password/169653/7 "2025-02-05T19:53:46Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
