Is there an api that we can to verify the expiry of a token and renew the token

Kuntamukkala, Dinesh 0 Reputation points

We are using Angular SPA, integrated with MSAL3.0.
Trying to implement session timeout when a user idle on browser.

Is there an api that we can to verify the expiry of a token and renew the token that can checked at regular intervals?

When we are using local storage we are facing issue with multiple tabs and windows of the same app using with the browser for idle timeout use cases.


Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,863 questions
{count} votes

1 answer

Sort by: Most helpful
  1. hossein jalilian 2,370 Reputation points

    Hi Dinesh,

    Thanks for posting your question in the Microsoft Q&A forum.

    With the token store approach, you can retrieve tokens (Link) from the store when needed, and you can instruct App Service to refresh them automatically when they become invalid (Link). This approach is commonly used with Easy Auth in Azure App Service.

    To accomplish this, you can follow the guidance provided in the documentation. Essentially, you leverage the Easy Auth feature of Azure App Service, which handles authentication and token management for you.

    As described in the documentation, one way to avoid token expiration is by making a GET call to the /.auth/refresh endpoint of your application. This endpoint triggers a token refresh process, ensuring that your application always has up-to-date and valid authentication tokens.

    Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful

    0 comments No comments