stevenmaguire / oauth2-keycloak

Keycloak Provider for OAuth 2.0 Client
MIT License
204 stars 151 forks source link

Return Groups in Access Token #71

Open rds3006 opened 1 year ago

rds3006 commented 1 year ago

I am trying to get the user details after authenticating with Keycloak v21.0.2. I am getting the details with the user authenticated with the client and client scopes. But I am adding a new client scope of Type Group Membership then the code is breaking and giving me errors as "Notice: Undefined index: error_description" and is not returning anything. Group membership Client scope :

image image

Error from Symfony :

image

Now if I remove the group client scope and it is returning back the token. I am not sure if this is issue with Keycloak or the oauth-client-bundle which we are using.

User coming from LDAP/AD Directory will be having group information associated and will have access to application based upon the groups only, hence it is mandatory to get the group in the token.

@stevenmaguire/anyone Any help or suggestion will be appreciated.

mstefan21 commented 12 months ago

Next week I will look at and prepare fix or info what you need change or setup different