-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add one-second delay after redirect during OAuth reset (#371) #373
Conversation
if (errorBody.redirect === true) redirect('/') | ||
if (errorBody.redirect === true) { | ||
redirect('/') | ||
await new Promise(resolve => setTimeout(resolve, 1000)) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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 implementingLayout
(see #348).