Hi @Ujjawal Rajyaguru , please review this document. "Refresh tokens sent to a redirect URI registered as spa
expire after 24 hours. Additional refresh tokens acquired using the initial refresh token carry over that expiration time, so apps must be prepared to rerun the authorization code flow using an interactive authentication to get a new refresh token every 24 hours. Users don't have to enter their credentials and usually don't even see any related user experience, just a reload of your application. The browser must visit the sign-in page in a top-level frame to show the login session. This is due to privacy features in browsers that block third party cookies."
refresh_token_lifetime_secs
configuration item sets the maximum lifetime of a refresh token in seconds. However, it is important to note that this configuration item is only applicable to confidential clients, not public clients such as SPAs.
In your case, since you are working with an SPA, you may need to consider using a different approach to handle token refresh. One option is to use the silent renew
technique, which involves using an iframe to silently renew the access token before it expires. This approach does not require the use of refresh tokens and can be used with public clients such as SPAs.
Another option is to use the refresh token rotation
technique, which involves rotating the refresh token periodically to prevent it from expiring. This approach requires the use of a backend server to handle the token rotation and can be used with public clients such as SPAs.
Please let me know if you have any questions and I can help you further.
If this answer helps you please mark "Accept Answer" so other users can reference it.
Thank you,
James