-
Notifications
You must be signed in to change notification settings - Fork 956
How to obtain refresh token when using client credentials? #195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The spec states the ClientCredentials grant type MUST NOT allow for the issuing of refresh tokens. So the answer is, you have to use a different grant type to receive a refresh token with your access token. |
This is the second hit when googling this, so to be absolutely correct it should be noted that the client credentials grant type SHOULD NOT issue a refresh token (http://tools.ietf.org/html/rfc6749#section-4.4.3). I think you are confusing it with the implicit grant, in which refresh tokens MUST NOT be issued. |
Ok thanks for the clarification guys... |
Does anyone know the rationale for this? I actually can't figure out why this would be the case. Seems like an arbitrary decision?.. My first thought was that client_credentials grant doesn't require a username and password so an attacker who compromises your application key would find it easier to stay hidden? |
Maybe because it makes no sense to refresh a token, when you can just as easy get a new one (no user approval required for getting a token when using client credentials). |
@bshaffer, just to clarify: are we reading SHOULD NOT cases as MUST NOT on the current implementation of the package, just like in this refresh token case? |
@oytuntez no, just in this case, and even here it was an accident. We can definitely open Client Credentials up for Refresh Tokens |
I posted this many months ago.. |
Yeah, good points by @Kalyse. Since it's not strictly forbidden, I wouldn't mind if a PR was submitted to add this, but it is not a priority for me. |
Hi
This is more of a question than an issue.
I can see that a
RefreshToken
grant type takes a refresh token and issues a new access_token.However, in the light of this issue I cannot see how to actually obtain a refresh token in the first place when using Client Credentials?
Great library by the way ;)
Thanks,
Chris
The text was updated successfully, but these errors were encountered: