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 message flashed in confusing way before redirect for OAuth #372

Open
ssciolla opened this issue Mar 29, 2022 · 0 comments
Open

Error message flashed in confusing way before redirect for OAuth #372

ssciolla opened this issue Mar 29, 2022 · 0 comments
Labels
🐛 bug Something isn't working front end Involves changes to the React application or other client-related files usability

Comments

@ssciolla
Copy link
Contributor

ssciolla commented Mar 29, 2022

Currently, if the user manually removes the tool's integration with Canvas from the Canvas side (in the user's Settings), then tries to reload CCM (or make an API call on a preloaded client), an error message will flash briefly before the user is redirected to the root (App.tsx) and then shown the authorize text (AuthorizePrompt.tsx). This is because an UnauthorizedError is ultimately thrown, but the redirect (window.href = '/') takes a couple moments to take effect. This can be somewhat confusing to the user, though ultimately it shouldn't hamper their use of the tool.

Unfortunately, because the redirect occurs in a plain JS/TS utility function, rather than a React component, it's not simple to change what the user sees without also modifying error handling, and making changes in many places.

One possible solution would be to delay a second or two after redirecting before resolving the function (handleErrors is async), which would likely hide the error, though the user may see loading content flicker.

Screen.Recording.2022-03-29.at.5.13.09.PM.mov
@ssciolla ssciolla added 🐛 bug Something isn't working front end Involves changes to the React application or other client-related files usability labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working front end Involves changes to the React application or other client-related files usability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant