Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error obtaining the roles #190

Open
ErnestoCamilo opened this issue Jun 9, 2023 · 0 comments
Open

Error obtaining the roles #190

ErnestoCamilo opened this issue Jun 9, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ErnestoCamilo
Copy link

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"); });
image

Expected behavior
I need to obtain the roles to validate them

Screenshots
image

Platform used
Canvas

@ErnestoCamilo ErnestoCamilo added the bug Something isn't working label Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants