Skip to content

Commit

Permalink
added comment for intial login
Browse files Browse the repository at this point in the history
  • Loading branch information
anyoussefinia committed Dec 11, 2024
1 parent 2ee3df6 commit e1ae914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/app-api/getUserV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const main = handler(async (event) => {
console.log("decoded id token: ", decodedIdToken);
const idTokenEmail = decodedIdToken.email;
let userRoles = decodedIdToken.user_roles;

// on initial login user roles is undefined
if(!userRoles) {
const userItem = (await getUser(event.queryStringParameters.email)) ?? {};
userItem.validRoutes = getUserRoleObj(userItem.roleList).getAccesses();
Expand Down

0 comments on commit e1ae914

Please sign in to comment.