tl-its-umich-edu / canvas-course-manager-next

Canvas Course Manager Next: A redesign of the existing CCM application. It extends Canvas features, makes cumbersome features easier to use, and adds new features.
8 stars 9 forks source link

Error when launching CCM in Safari #312

Closed jonespm closed 2 years ago

jonespm commented 2 years ago

When launching CCM from Safari on Canvas beta this error returns

{"status":401,"error":"Unauthorized","details":{"description":"Error validating ltik or IdToken","message":"MISSING_VALIDATION_COOKIE"}}

I believe this is a common issue with Safari if a user has the default Privacy option "Prevent cross-site tracking" checked. I saw it was brought up as an issue in the library but there was no resolution. The resultion by most other vendors is either turn this setting off or switch to a vanity URL, which we've been in the process of doing but isn't complete.

I tested on Canvas Test which does have a vanity URL and it works fine. However this will be the same in prod as it is in beta.

Our python apps that use pylti13 prompt to open a new window. That's because there's javascript to check for this in the library. Since the majority of our users are on Safari this might be something we need to address and at least prompt users to open in a new window or disable this option.

IMS LTI team is working on a solution to avoid this by using postMessage rather than cookies but this isn't yet in the spec.

ssciolla commented 2 years ago

I'm not exactly sure how "prompt to open a new window" would work, but I think a partial solution would be to use the provided ltijs hook and redirect to a page with an appropriate message and a link to documentation.

Here's the hook docs: https://cvmcosta.me/ltijs/#/provider?id=provideroninvalidtokeninvalidtokencallback

I think #316 could make this easier to accomplish with professional styling.

pushyamig commented 2 years ago

@melindakraft , Can you suggest the user message telling about the error?

melindakraft commented 2 years ago

It seems your browser is blocking 3rd party cookies which are required for this application. To resolve this issue, please update your settings for Chrome, Safari for MacOS, Safari for iOS, Firefox, and Microsoft Edge to allow 3rd party cookies.

ssciolla commented 2 years ago

@melindakraft, @pushyamig, working on this now. A thought occurred to me: should all these browser specific links be in the help docs or on this page? I could see arguments for doing it either way.

pushyamig commented 2 years ago

We can create a generic separate error pages in documentation and we can link to that page.

melindakraft commented 2 years ago

Error messaging works as expected. This might be a nuance of my Safari, but the only way I can get the links to the browser support resources to work is to right click on them and open in a new tab.