# If I force refresh the credentials in my RN application, will that refresh also transition to the Web browser session?

**URL:** <https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469>\
**Category:** Get Help\
**Tags:** new-universal-login-experience, login-experience\
**Created:** [January 23, 2024, 3:52pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469 "2024-01-23T15:52:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BSK](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bsk/32/49977_2.png) [@BSK](https://community.auth0.com/u/BSK)\
**Post date:** [January 23, 2024, 3:52pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469/1 "2024-01-23T15:52:30Z")

</div>

Lets say I have a React Native mobile application and a React Web SPA. If I were to login in Auth0 through the React Native mobile application’s universal login, the Web browser would also have the session thanks to the out of the box SSO and would login me instantly without me having to input my username and password.

Now I am wondering what would happen to the web browser session if I were to go back to my mobile application and call getCredentials() with forceRefresh set to true, which in turn would refresh the credentials. Will the new credentials somehow automatically transition to the web browser session, or do I have to take some extra steps in order to achieve that?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 25, 2024, 10:07pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469/3 "2024-01-25T22:07:31Z")

</div>

Hi @BSK,

According to the docs, the [CredentialsManager | react-native-auth0](https://auth0.github.io/react-native-auth0/classes/Types.CredentialsManager.html) uses a refresh token to renew the access token. This wouldn’t have an impact on the browser session.

If you want to refresh the tokens in your React SPA, you would need to initiate the request in that application.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![BSK](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/bsk/32/49977_2.png) [@BSK](https://community.auth0.com/u/BSK)\
**Post date:** [January 26, 2024, 12:01pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469/4 "2024-01-26T12:01:32Z")

</div>

Hi @dan.woda ,

First of all, I’d like to thank you for your response!

Lets say my access token has a 30 minute expiration time - If I were to login in my React Native application through the universal login flow, I’d also be able to login in my React SPA without having to input my credentials again thanks to the SSO for 30 minutes, correct?

What would happen if I attempt to authenticate to Auth0 on the React SPA after 1 hour? You mentioned that renewing the session on the React Native side would not impact the browser session, so does that mean the SSO won’t work anymore and I’d be prompted for credentials again?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 26, 2024, 3:17pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469/5 "2024-01-26T15:17:09Z")

</div>

No problem, happy to help!

The token expirations and [session lifetimes](https://auth0.com/docs/manage-users/sessions/configure-session-lifetime-settings) are different. For example, you could have a 3 day session lifetime, and a 5 minute access token lifetime.

The sessions are dictated by the settings in the link above, and aren’t beholden to the token lifetimes.

> [@BSK](#):
>
> What would happen if I attempt to authenticate to Auth0 on the React SPA after 1 hour?

If the session lifetime was long enough, you would receive a new token.

> [@BSK](#):
>
> You mentioned that renewing the session on the React Native side would not impact the browser session, so does that mean the SSO won’t work anymore and I’d be prompted for credentials again?

I said _renewing the access token with a refresh token_ won’t impact the browser’s session cookie with the Auth0 server.

Does that make sense?

---

<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 9, 2024, 3:17pm UTC](https://community.auth0.com/t/if-i-force-refresh-the-credentials-in-my-rn-application-will-that-refresh-also-transition-to-the-web-browser-session/125469/6 "2024-02-09T15:17:50Z")

</div>

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