node-oauth2-server icon indicating copy to clipboard operation
node-oauth2-server copied to clipboard

Now that I got the accessToken, is there any built-in method to verify if the login is correct?

Open Thyoity opened this issue 8 years ago • 1 comments

Hi, I'm using password grant with Restify. Everything is working great.

I just wanted to know if there is something built-in (some method) to verify if the accessToken sent via request is valid or not, so I can use it in a middlewere for my protected routes.

If not, how should I do it manually? Could I just create a middleware that verifies if accessToken in database is not expired? If so, allow the access?

Is there something I don't see?

Thyoity avatar Aug 25 '17 13:08 Thyoity

I think I have the same problem. I save the token in a session cookie, and use that cookie for authentication. oauthServer.token() check the Authorization header, wich respects the protocol.. but if I want to check it from elsewhere?

luckv avatar Feb 22 '19 22:02 luckv