-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JS] feat: Add
enableSso
property to toggle SSO in user auth scenar…
…ios (#1232) ## Linked issues closes: #1194 (issue number) ## Details Introduced `enableSso` property in the `OAuthSettings` to toggle SSO in `OAuth` adaptive card, bot and message extension scenarios. ### Change details The authentication feature is broken down into these 3 scenarios, so I had to update these individual implementations for the `enableSso` property to work. **Bot auth** * In bot auth, to disable sso you simply have to not include the `tokenExchangeResource` in the oauth card. The original `OAuthPrompt` didn't allow that so I had to create the `OAuthBotPrompt` to override the `beginDialog` method and `sendOauthCard`. **Message Extension auth** * In ME auth, to disable sso you simply set the `type` to `auth` instead of `silentAuth`. I introduced a `isSsoSignIn` method to determine whether to use auth or not. This is because the card creation happens in the ME auth base class, which is used for `TeamsSSO` auth as well. **Adaptive Card auth** * In adaptive card auth, to disable sso you simply don't include the `tokenExchangeResource` in the card. ## 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 --------- Co-authored-by: Corina <[email protected]>
- Loading branch information
Showing
18 changed files
with
524 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.