diff --git a/services/admin/handlers/addPropertyToJWT.js b/services/admin/handlers/addPropertyToJWT.js index cf03fea3f..1e03da9d5 100644 --- a/services/admin/handlers/addPropertyToJWT.js +++ b/services/admin/handlers/addPropertyToJWT.js @@ -14,7 +14,7 @@ const handler = async (event) => { event.response.claimsOverrideDetails.claimsToAddOrOverride = event.response.claimsOverrideDetails.claimsToAddOrOverride || {}; // Example of adding roles dynamically from DynamoDB to the JWT claims - event.response.claimsOverrideDetails.claimsToAddOrOverride["user_roles"] = JSON.stringify(roles); // Add user roles + event.response.claimsOverrideDetails.claimsToAddOrOverride["custom:user_roles"] = JSON.stringify(roles); // Add user roles } catch(e) { console.log("error updating id token claims", e) }