OAuth Refresh Token FAQ

 

Q1. How does OAuth refresh token work in the new OAuth Account? Is there any schedular that runs for token refresh and how is it tracking token expiry?

Firstly, there is no scheduler and tracking of token expiry. Adeptia doesn't unnecessarily hit the Account for the expiry token. When the token expires, it gets the 401 unauthorized response from the server, and after this, the OAuth Account fetches the new token automatically and uses the same until it expires.

 

Q2. How refresh token works on expiry. How to handle errors in OAuth account example, in case of token expired and OAuth account is not able to fetch new token?

Refresh token will automatically update on expiration. Also, the Access token get expires not the refresh token.
In case of token expire, Adeptia takes care of it on its own. Whenever there is an error then it automatically fetches a new token and starts executing. There is no manual handling of this.
Q3. What happens when the same WSC consumer is running in parallel and the token expires, how is multi-thread handled.
Adeptia uses the Refresh Token grant type to exchange a refresh token for an access token when the access token has expired. 

The first WSC consumer that receives the 401 response code refreshes the token and all others then uses the updated access token.

 

Q4. What if OAuth is not able to fetch the token, what is the error alert.

The error message is "Authorization failed: Access token not valid and unable to refresh the access token."

Have more questions? Submit a request

0 Comments

Article is closed for comments.