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

Change default scope separator to space #23

Merged
merged 1 commit into from
Oct 14, 2020

Conversation

bastnic
Copy link
Contributor

@bastnic bastnic commented Mar 28, 2020

I'm not sure about this PR but I'm facing an issue it seems nobody else have.

Currently, the auth call is https://<keycloak url>/auth/realms/<realm>/protocol/openid-connect/auth?scope=email%2Copenid%2Cprofile%2Coffline_access%2Cphone&state=<state>&response_type=code&approval_prompt=auto&redirect_uri=<url encoded redirect uri>&client_id=<client> because the scope separator is the comma and the urlencode is PHP_QUERY_RFC3986.

This results by Keycloak not following the scope given and only returning the default one (email and profile in my case). So I get a Refresh refresh token and not an Offline as asked.

Changing the scope separator to be a space fix it for me.

I don't think it's relevant but I've some layers of AWS cloudfront / ALB before getting to Keycloak.

@graste graste mentioned this pull request May 30, 2020
@andheiberg-gelato
Copy link

@stevenmaguire could you merge this?

This is needed. The code as is does not follow the KeyCloak spec.

https://www.keycloak.org/docs/latest/server_admin/#example

The scope parameter contains the string, with the scope values divided by space (which is also the reason why a client scope name cannot contain a space character in it).

@mstefan21
Copy link
Collaborator

Hi, This week I will prepare release of new version with this, because space is as separator from keycloak version 9 and higher

@mstefan21 mstefan21 merged commit 12fab5d into stevenmaguire:master Oct 14, 2020
@mstefan21
Copy link
Collaborator

merged as new release 2.2.0

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