We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents abbde59 + 92b7bb4 commit 6c14a51Copy full SHA for 6c14a51
forms-flow-service/src/keycloak/KeycloakService.ts
@@ -117,8 +117,9 @@ import Keycloak, {
117
.then((authenticated) => {
118
if (authenticated) {
119
console.log("Authenticated");
120
- if (!!this.kc?.resourceAccess) {
121
- const UserRoles = this.kc?.resourceAccess[this.kc.clientId!]?.roles;
+ const tokenParsed = this.kc.tokenParsed || {};
+ const UserRoles = tokenParsed.roles || tokenParsed.role || tokenParsed.client_roles || [];
122
+ if (UserRoles.length > 0) {
123
if(!UserRoles){
124
callback(false);
125
}
0 commit comments