Skip to content
This repository

Standard way of checking if token is valid #119

Open
jmburges opened this Issue October 31, 2012 · 1 comment

2 participants

Joe Burgess Nick Hammond
Joe Burgess

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.

Thanks

Nick Hammond

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
Something went wrong with that request. Please try again.