Skip to content
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

[7.0] Support a default scope when no scope was requested by the client #879

Merged
merged 2 commits into from
Nov 12, 2018
Merged

Conversation

corbosman
Copy link

According to the RFC if a client omits a scope, the server can choose to use a default scope. League OAuth2 server supports setting a default scope, but Laravel does not. This PR adds support for setting a default scope in Laravel. (see discussion on #870).

The scope can be passed as either an array or a space delimited list, and can be set in AuthServiceProvider

Passport::setDefaultScope('email username');

This PR should be fully backwards compatible with 7.0. If the user doesn't add a default scope, nothing changes.

@driesvints driesvints changed the title support a default scope when no scope was requested by the client [7.0] Support a default scope when no scope was requested by the client Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants