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

Add one-second delay after redirect during OAuth reset (#371) #373

Conversation

ssciolla
Copy link
Contributor

The PR aims to resolve #372.

It feels like a band-aid solution, but also low-risk. I also removed some redundant spacing in AuthorizePrompt I forgot about when implementing Layout (see #348).

@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
@ssciolla ssciolla requested a review from pushyamig March 29, 2022 21:31
@ssciolla ssciolla changed the title Add one second delay after redirect; fix spacing in AuthorizePrompt Add one second delay after redirect during OAuth reset (#371) Mar 29, 2022
@ssciolla ssciolla changed the title Add one second delay after redirect during OAuth reset (#371) Add one-second delay after redirect during OAuth reset (#371) Mar 29, 2022
if (errorBody.redirect === true) redirect('/')
if (errorBody.redirect === true) {
redirect('/')
await new Promise(resolve => setTimeout(resolve, 1000))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah.. This is a band-aid solution to me as well. To my understanding adding a time out should be avoided if you can.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this code only hit when OAuth token is revoked from canvas console?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few cases where it would be triggered actually. Anything that results in a redirect from InvalidTokenInterceptor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can think about other solutions to this, just may be more code involved.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer a more concrete solution than adding a timeout. But I am open for discussion, if that is not possible at all.
With that said, I spoke with @melindakraft on this she is fine if the change doesn't make it the release and worked on next phase of the project since this doesn't not disrupt user expectation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. I'll close this PR for now. We can discuss more at a later time.

@ssciolla ssciolla closed this Mar 30, 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 this pull request may close these issues.

Error message flashed in confusing way before redirect for OAuth
2 participants