When I am introspecting a access token after an interval hydra is returning { “active”: false }. If I hit on oauth2/introspect again I am getting { “active”: true …}. On the first hit on oauth/introspect I found in the log
hint=“An introspection strategy indicated that the token is inactive.”
So I am guessing after first hit the access token getting activated so after that in second hit it’s sending that the token is active.
So how should I handle this
- Active a access token somehow before introspect
- Is it possible to know when the access token will inactive in client side so that client can get a new access token if it’s inactive. I can check the access token expires time but didn’t see any inactive time.
- Send error to the client and then client will get a new access token
Update:
Actually I found out that the hydra server gets idle mode (or something like that) if it don’t receive any request for sometime (5-10 minute). After that any request to hydra server result in error but in next hit and onwards it works fine. Any idea how fix it?