keycloak_flutter icon indicating copy to clipboard operation
keycloak_flutter copied to clipboard

Get keycloak instance (to get roles for a particular user)

Open tanql opened this issue 3 years ago • 1 comments

Not really an issue, but a request/question. Is it possible to get the KeycloakServices Keycloak? I would like to know the roles of the user, which can be found through the parsedToken. I can only get the userprofile from the service, but it doesn't contain the roles which I need. Or am I supposed to parse the getToken somehow?

tanql avatar Aug 29 '22 14:08 tanql

The roles are included in the token. You can decode the token to retrieve the roles.

gibahjoe avatar Aug 30 '22 03:08 gibahjoe