Oauth Login, How to known access token expired?

Hi,

I am trying Oauth login to connect ERPNext from the mobile app, How to know that the access token is expired?
when expired I got a permission error. If I didn’t provide access to some doctype to specific user. That time also, I receive same permission error (403 forbidden).

How do we differentiate this?

  • store expiry and check before using token
  • use introspection endpoint
1 Like

Thankyou @revant_one

HI @revant_one ,

I am seeing all bearer tokens is created onthe Oauth Bearer token, showing active even after the expiry time. So, the introspection endpoint always returns active.

That needs to be fixed then. You can store the expiry and check that for now. Or check if exp claim from introspection.

Okay @revant_one