# Get the token after loginWithRedirect()

**URL:** <https://community.auth0.com/t/get-the-token-after-loginwithredirect/106919>\
**Category:** Get Help\
**Tags:** management-api, login-experience, new-universal-login-experience\
**Created:** [May 15, 2023, 11:57am UTC](https://community.auth0.com/t/get-the-token-after-loginwithredirect/106919 "2023-05-15T11:57:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luan.t44](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/luan.t44/32/47215_2.png) [@luan.t44](https://community.auth0.com/u/luan.t44)\
**Post date:** [May 15, 2023, 11:57am UTC](https://community.auth0.com/t/get-the-token-after-loginwithredirect/106919/1 "2023-05-15T11:57:58Z")

</div>

Hello guys.

I’m using Auth0 with ReactJS, do you know how I can get the logged in token after using loginWithRedirect()?

---

<div class="post-metadata">

**Author:** ![ty.frith](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/ty.frith/32/58484_2.png) [@ty.frith](https://community.auth0.com/u/ty.frith)\
**Post date:** [May 16, 2023, 12:15am UTC](https://community.auth0.com/t/get-the-token-after-loginwithredirect/106919/3 "2023-05-16T00:15:33Z")

</div>

Hi there @luan.t44 welcome to the community!

Tokens returned will by default be stored in memory - Since `loginWithRedirect()` does not handle these tokens directly, you will want to take a look at the methods `getAccessTokenSilently()` (most common) and `getAccessTokenWithPopup()` outlined here:

> **[Auth0ContextInterface | @auth0/auth0-react](https://auth0.github.io/auth0-react/interfaces/Auth0ContextInterface.html)**
>
> Documentation for @auth0/auth0-react

If you haven’t already, I definitely recommend taking a look at our React sample app as both are used in [externalApi.js](https://github.com/auth0-samples/auth0-react-samples/blob/e1aa044df0d8dafe9950207486e0f2c879b67b58/Sample-01/src/views/ExternalApi.js#L25).

Hope this helps to clarify!

---

<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:** [May 30, 2023, 12:15am UTC](https://community.auth0.com/t/get-the-token-after-loginwithredirect/106919/4 "2023-05-30T00:15:43Z")

</div>

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