diff --git a/services/app-api/getUserV2.js b/services/app-api/getUserV2.js index cbc480e36..1a27592a3 100644 --- a/services/app-api/getUserV2.js +++ b/services/app-api/getUserV2.js @@ -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();