Hi I use this to check if the user has a specific group. To render specific sub pages for them.
const user_groups = user.signInUserSession.accessToken.payload['cognito:groups'];
try {
if (user_groups.includes("Manager")){
show_manager_page = true
}
if (user_groups.includes("humanRessource")){
show_humanRessource_page = true
}
} catch (TypeError) {
console.log("NO ACCESS TO ADDITIONAL PAGES");
}```
My question is if this could be bypassed by someone with malicious intent?