Issue in OAuth 2 tokens expiry

Not applicable

Hi,

I am using password grant type for generating tokens. For testing I have kept the expiry of access token and refresh token as 3 and 5 minutes respectively.
I am getting peculiar issue where in even after the access token is expired Verify Access Token OAuth v2 Policy is validating is successfully. I am intermittently getting data and access token expired message.
Same behavior is observed while renewing the access token with the help of refresh token.
Any pointer on this issue will help.

Thanks,

Vinita

0 4 304
4 REPLIES 4

if you send 4 requests, will you get 2 data, 2 error responses?

Not applicable

Yes. That's what happening. It's giving data and error intermittently. Even though token is not expired i am getting 401 Access Token Expired.

Hi @vinita_dwivedi,

There is a lag in updating the expired status across multiple processing servers.

Go through this for a better understanding -

https://community.apigee.com/questions/33932/changing-the-status-of-the-organizationapplication.html

Not applicable

Thanks @Nisha Mallesh! My issue is resolved now. I was facing this issue as all the Edge components were not correctly updated with the time via an ntp server (all components did not have the same time). After updating time on all the components flow is working perfectly.