jaredhanson / oauth2orize

OAuth 2.0 authorization server toolkit for Node.js.
https://www.oauth2orize.org?utm_source=github&utm_medium=referral&utm_campaign=oauth2orize
MIT License
3.47k stars 469 forks source link

How to send refresh token next to access token after authorization? #219

Open felixfrtz opened 6 years ago

felixfrtz commented 6 years ago

Hey,

I am working on an implementation which requires that after the user approved a client, the client needs to receive the refresh_token as well next to the access_token. I already implemented the refresh_token on the token route, meaning that retrieving a new access_token with a given refresh_token works. However, tokne.js doesn't seem to provide an input for a refresh_token.

What I expected is that one calls done(null, accessToken, refreshToken) and both get sent. How can this be implemented?

jesseg34 commented 6 years ago

@warhost checkout my answer to issue #222 and let me know if that is what you needed.