You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to obtain the roles of the person who establish the communication to validate them, but when accessing the token. the roles of IdToken are undefined. However, I see the roles when I tried to stringify the income token.
I tried to obtain the roles of the person who establish the communication to validate them, but when accessing the token. the roles of IdToken are undefined. However, I see the roles when I tried to stringify the income token.
lti.onDeepLinking((token, req, res) => { Logger().info(Deep Linking is working: ${JSON.stringify(token)}); const roles = token.roles; Logger().info(Roles: ${JSON.stringify(roles)}); if(roles.includes("Student")){ return res.status(401).send("You don't have permission"); } lti.redirect(res, "/api/lti/deeplink"); });
Expected behavior
I need to obtain the roles to validate them
Screenshots
Platform used
Canvas
The text was updated successfully, but these errors were encountered: