-
Notifications
You must be signed in to change notification settings - Fork 492
OAuthPrompt timeout applies to all auth related events and invokes. #4399
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
Conversation
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 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.
![]()
|
@carlosscastro We beleive this is good to merge. Tom has looked at it, and Eric confident. Just because OAuth and SSO are such nuanced areas, can you take a quick peek before we merge? |
| || IsTokenResponseEvent(dc.Context) | ||
| || IsTeamsVerificationInvoke(dc.Context) | ||
| || IsTokenExchangeRequestInvoke(dc.Context); | ||
| var hasTimedOut = isTimeoutActivityType && DateTime.Compare(DateTime.Now, expires) > 0; |
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.
DateTime.UtcNow
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.
Also, it's more readable if you compare dates with the operator IMO instead of DateTime.Compare, i.e. date1 > date2
Fixes #3627
This PR also prioritizes the timeout check before RecognizeTokenAsync, since RecognizeTokenAsync has side affects.