Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Standard way of checking if token is valid #119

jmburges opened this Issue Oct 31, 2012 · 1 comment


None yet
2 participants

Is there a standard way of checking if a token is valid? I know I can check the expired time, but I want to know if a user has revoked the token in some way.


There isn't anything in the OAuth2 specification that I know of that has a standard endpoint to verify credentials so it's going to depend on the API. For instance, with Twitter they have an API that you can ping to check on the credentials - https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials.

Other than that, you'll have to catch the login exception and then try and refresh the token or have the user re-authorize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment