-
Notifications
You must be signed in to change notification settings - Fork 151
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
Invalid Scope #25
Comments
Hello, I confirm the problem occurs with the update of Keycloak 10.0.1 |
I think #23 "Change default scope separator to space" is the relevant pull request that fixes this? |
You can try to change method \Stevenmaguire\OAuth2\Client\Provider\Keycloak::getDefaultScopes In this lib it returns ['name', 'email'] |
Hi, Any plan to fix this in a coming release ? I confirm that we reproduce the problem with Fix proposed by @leo-ural works fine Adding a thanks |
Released new version with fixed scope separator to space 2.2.0 |
@mstefan21 please note that this was about two issues: a wrong separator and a wrong default scope ( New issue regarding the other problem: #30 |
We used this library to authenticate users via Keycloak but recently the auth flow has faulted. The reason of an error is incorrect scope parameter sent to Keycloak within auth (from Keycloak's log):
If we take a look at Request URL we found comma between two scopes sent to Keycloak:
From a Server Administration Guide (https://www.keycloak.org/docs/latest/server_admin/):
If we change source code of a function getDefaultScopes() (https://github.com/stevenmaguire/oauth2-keycloak/blob/master/src/Provider/Keycloak.php#L177) from:
return ['name', 'email'];
to:
return ['profile email'];
then auth flow will be fixed.
Notice the scope 'name' does not exist by default (https://www.keycloak.org/docs/latest/server_admin/#_client_scopes) so we replaced it to 'profile'.
Please check the auth flow with the latest Keycloak release and fix the issue if persists.
The text was updated successfully, but these errors were encountered: