Use the Refresh_Token to get another Access_Token every 1 hour in nodeJS express App

245 Views Asked by At

I have got an access_token and refresh_token using Passport.js (passport-azure-ad) OIDCStrategy in my NodeJS Express application. Now every 1 hour my access-token expires and access to the app gets revoked. How can I use the refresh token to get another access-token once the previous access token expires. I want to keep requesting this access-token every 1 hour using the refresh-token. Can someone help me with a snippet that I can use.

0

There are 0 best solutions below