srijan saxena
srijan saxena

Reputation: 71

how to refresh the access token in azure b2c using MSAL.js after 24 hours?

im using Msal.js (acquireTokenSilent) to acquire the refresh token to keep the user logged in after the access token has expired. but the limit to this is that I can refresh the token only till the session cookie is valid. the trouble is that even though the refresh token is valid for 14 days but the session cookie expires after 24 hours and after that I cannot use acquireTokenSilent . How to refresh the token after 24 hours of inactivity ?

Upvotes: 1

Views: 1192

Answers (1)

Jas Suri - MSFT
Jas Suri - MSFT

Reputation: 11315

You aren’t using a refresh token here, this is a JavaScript app using cookie based SSO. You can use keep me signed in to extend the users Azure AD B2C session lifetime.

https://learn.microsoft.com/en-us/azure/active-directory-b2c/custom-policy-keep-me-signed-in

Upvotes: 2

Related Questions