Skip to content

Commit

Permalink
[repo] fix: TeamsSsoPrompt never completes due to timeout (#1958)
Browse files Browse the repository at this point in the history
## Linked issues

closes: #1744

## Details
**C# fix**
Changed `DateTime.Now` to `DateTime.UtcNow` when used in the
`TeamsSSOPrompt`.

**JS fix**
No bug in JS.

**PY**
TeamsSSO auth is not implemented as of now.


## 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
  • Loading branch information
singhk97 authored Aug 27, 2024
1 parent 8f0fbbd commit e2a42da
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public override async Task<DialogTurnResult> BeginDialogAsync(DialogContext dc,
int timeout = _settings.Timeout;

IDictionary<string, object> state = dc.ActiveDialog.State;
state[_expiresKey] = DateTime.Now.AddMilliseconds(timeout);
state[_expiresKey] = DateTime.UtcNow.AddMilliseconds(timeout);

// Send OAuth card to get SSO token
await this.SendOAuthCardToObtainTokenAsync(dc.Context, cancellationToken);
Expand Down

0 comments on commit e2a42da

Please sign in to comment.