-
Notifications
You must be signed in to change notification settings - Fork 783
Consent screen is only skipped for the same scope set as the last token #899
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
Can we first check if this conforms to the OAuth2 spec? |
@Sephster what's your take in this? |
The mechanism that @powelski is describing, is the same way that refresh tokens work. You can request the same scopes or fewer scopes (all must be included in the original access token request), but you are not able to request additional scopes on a refresh token. However, this is only applicable to a refresh token and not a request for an access token. To strictly conform to the OAuth 2 spec, I think we should probably be asking for consent every time. There is nothing in the spec about skipping consent if the same client asks for the same scopes again and has previously been approved. I'm not a hundred percent sure but I suspect working in this manner might risk a slight security issue. I don't think the system should be assuming that consent is given at time x because it was previously given at time y. I'm not familiar with the feature so don't know if there is an expiry time on this behaviour or not, but this would mitigate the risk somewhat. If the auth code grant is being used, I believe it should always be the user that gives consent to the client. |
@Sephster so you'd recommend to never skip? We'll need to adjust some things then? |
I'm going to close this because we haven't gotten any other requests for this. Will be happy to look into this again if it ever becomes a bigger issue. |
This is much of an issue in apps with many scopes, which are granted gradually. I believe Laravel Passport is not too often used heavily, or is used just as it is, with asking for permissions all the time. OAuth 2 can do better. |
Currently, the consent screen is skipped only if we request the exact same scopes as we did for the previous token. I think it could be improved to only display consent screen if there is a new scope requested. In other words, a scope that is not present in any active token for this user.
Example: now, if we previously granted
scopeA
,scopeB
andscopeC
to some app and then have another token requested forscopeA
andscopeC
, the consent screen will be displayed. But if we request a token for the exact same set of scopes (scopeA
,scopeB
,scopeC
), the consent screen is skipped. Also, if after accepting token forscopeA
,scopeB
andscopeC
we accept another token forscopeA
andscopeC
, another token request will only skip consent screen forscopeA
andscopeC
set. I don't see why would we want to skip the consent screen only for the exact same scope set as the last token we requested.The text was updated successfully, but these errors were encountered: