Vinu
Vinu

Reputation: 27

Handling Expired Access Token in Implicit Grant Flow Oauth2

We have implemented authentication as specified in the C# Teams Sample.Once the access_token expires we have to re-prompt the user to login.

Currently, the access_token expires in 1 hour.

Scopes:

When we request refresh token per the documentation, it gives an access denied error.

Is there a way to refresh the token instead of prompting the user to login again?

Upvotes: 0

Views: 484

Answers (1)

Srinivas Naidu - MSFT
Srinivas Naidu - MSFT

Reputation: 319

If you are using implicit grant after the token has been expired you should login again there will be no other option to get the access token.

If you use code grant then you will get RefreshToken along with AccessToken you can update get the new AccessToken using the RefreshToken. Please follow the link for Code grant implementation

Upvotes: 1

Related Questions