-
Notifications
You must be signed in to change notification settings - Fork 209
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
[Bug]: TeamsSsoPrompt never completes due to timeout #1744
Labels
Comments
This issue does not exist in JS. Definition:
Check:
|
1 task
singhk97
added a commit
that referenced
this issue
Sep 4, 2024
## Linked issues closes: #1744 #1933 ## Details Fixed bug in both #1744 and #1933. The issue does not persist in either JS, or PY so the fix is only for C#. #### Change details * Refactored `FilteredTeamsSSOTokenExchangeMiddleware` as the underlying middleware was not being invoked correctly. * The `app.adapter.Use` method was being called for every incomming request (since the `Application` object is a transient in the Asp.NET service collection). * As for the issue in #1744 - The code is updated to use `DateTime.UtcNow` by default. ## Attestation Checklist - [x] My code follows the style guidelines of this project - I have checked for/fixed spelling, linting, and other errors - I have commented my code for clarity - I have made corresponding changes to the documentation (updating the doc strings in the code is sufficient) - My changes generate no new warnings - I have added tests that validates my changes, and provides sufficient test coverage. I have tested with: - Local testing - E2E testing in Teams - New and existing unit tests pass locally with my changes ### Additional information > Feel free to add other relevant information below
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Language
C#
Version
latest
Description
Here the timeout value (default 15 minutes) is used to assign an absolute expiration time into the state. Later, it is used to determine if the prompt has timed out. Unfortunately, the initial assignment uses
DateTime.Now
but the check usesDateTime.UtcNow
. This means that anybody who is more than 15 minutes behind UTC will observe that the dialog always times out at this stage.Reproduction Steps
1. Try to run the 06.auth.teamsSSO.bot in the US, which is 5 or more hours behind UTC. It always silently ends the dialog before handling the token exchange invoke activity.
The text was updated successfully, but these errors were encountered: