Skip to content

Commit 919cd63

Browse files
authored
[JS] chore: Fix auth sample TTK F5 flow (#956)
## Linked issues closes: #955 (issue number) ## Details samples fixed: oauth bot, message extension & adaptive card - Fix readme - remove `npm install` in the F5 flow since users will use yarn and do install & build before. Plus the re-build happens through nodemon once in debug mode. - uncomment "Deploy" in the oauth bot. ## 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 (we use [TypeDoc](https://typedoc.org/) to document our code) - 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
1 parent d888f08 commit 919cd63

File tree

7 files changed

+21
-32
lines changed

7 files changed

+21
-32
lines changed

js/samples/06.auth.oauth.adaptiveCard/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ This sample requires creating an OAuth Connection in Azure Bot Service, which pr
3939
3. In a terminal, navigate to the sample root.
4040

4141
```bash
42-
cd teams-ai/js/samples/06.auth.adaptiveCardSSO/
43-
yarn start
42+
cd teams-ai/js/samples/06.auth.oauth.adaptivecard
4443
```
4544

45+
4. Jump to [Multiple ways to test](#multiple-ways-to-test).
46+
4647
## Interacting with the bot
4748

4849
Once the bot is successfully sideloaded and installed, send any message to it. The bot will respond with an adaptive card with a sign in button. Clicking on it will initiate the sign in flow. Once that is done, the card should update to show the users profile picture and name.
@@ -92,7 +93,7 @@ You can also use the Teams Toolkit CLI to run this sample.
9293
1. In the repository directory, run the Teams Toolkit CLI commands to automate the setup needed for the app
9394
9495
```bash
95-
cd teams-ai/js/samples/06.auth.adaptiveCardSSO/
96+
cd teams-ai/js/samples/06.auth.oauth.adaptivecard
9697
teamsfx provision --env local
9798
9899
```
@@ -113,10 +114,10 @@ You can also use the Teams Toolkit CLI to run this sample.
113114
114115
> If you used Teams Toolkit in the above steps, you can [upload a custom app](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload) to a desktop client using the `/appPackage/appPackage.local.zip` file created by the tools and skip to step 6.
115116
116-
1. In a terminal, navigate to `teams-ai/js/samples/06.auth.adaptiveCardSSO/`
117+
1. In a terminal, navigate to `teams-ai/js/samples/06.auth.oauth.adaptivecard`
117118
118119
```bash
119-
cd teams-ai/js/samples/06.auth.adaptiveCardSSO/
120+
cd teams-ai/js/samples/06.auth.oauth.adaptivecard
120121
```
121122
122123
1. Run ngrok tunneling service - point to port 3978

js/samples/06.auth.oauth.adaptiveCard/teamsapp.local.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ provision:
101101
# Defines what the `deploy` lifecycle step does with Teams Toolkit.
102102
# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`.
103103
deploy:
104-
# Ensures that the project dependnecies are installed.
105-
- uses: cli/runNpmCommand
106-
with:
107-
args: install --no-audit
108-
109104
# Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`.
110105
- uses: file/createOrUpdateEnvironmentFile
111106
with:

js/samples/06.auth.oauth.bot/.vscode/tasks.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"Validate prerequisites",
1111
"Start local tunnel",
1212
"Provision",
13-
// "Deploy",
13+
"Deploy",
1414
"Start application"
1515
],
1616
"dependsOrder": "sequence"

js/samples/06.auth.oauth.bot/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ This sample requires creating an OAuth Connection in Azure Bot Service, which pr
3939
3. In a terminal, navigate to the sample root.
4040

4141
```bash
42-
cd teams-ai/js/samples/01.messaging.a.SsoAuthBot/
43-
yarn start
42+
cd teams-ai/js/samples/06.auth.oauth.bot/
4443
```
4544

45+
4. Jump to [Multiple ways to test](#multiple-ways-to-test).
46+
47+
4648
## Interacting with the bot
4749

4850
You can interact with this bot by sending it a message, which will echo back to you.
@@ -92,7 +94,7 @@ You can also use the Teams Toolkit CLI to run this sample.
9294
1. In the repository directory, run the Teams Toolkit CLI commands to automate the setup needed for the app
9395
9496
```bash
95-
cd teams-ai/js/samples/01.messaging.a.SsoAuthBot/
97+
cd teams-ai/js/samples/06.auth.oauth.bot/
9698
teamsfx provision --env local
9799
98100
```
@@ -113,10 +115,10 @@ You can also use the Teams Toolkit CLI to run this sample.
113115
114116
> If you used Teams Toolkit in the above steps, you can [upload a custom app](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload) to a desktop client using the `/appPackage/appPackage.local.zip` file created by the tools and skip to step 6.
115117
116-
1. In a terminal, navigate to `teams-ai/js/samples/01.messaging.a.SsoAuthBot/`
118+
1. In a terminal, navigate to `teams-ai/js/samples/06.auth.oauth.bot/`
117119
118120
```bash
119-
cd teams-ai/js/samples/01.messaging.a.SsoAuthBot/
121+
cd teams-ai/js/samples/06.auth.oauth.bot/
120122
```
121123
122124
1. Run ngrok tunneling service - point to port 3978

js/samples/06.auth.oauth.bot/teamsapp.local.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,6 @@ provision:
101101
# Defines what the `deploy` lifecycle step does with Teams Toolkit.
102102
# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`.
103103
deploy:
104-
# Ensures that the project dependnecies are installed.
105-
- uses: cli/runNpmCommand
106-
with:
107-
args: install --no-audit
108-
109104
# Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`.
110105
- uses: file/createOrUpdateEnvironmentFile
111106
with:

js/samples/06.auth.oauth.messageExtension/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ This sample requires creating an OAuth Connection in Azure Bot Service, which pr
3939
3. In a terminal, navigate to the sample root.
4040

4141
```bash
42-
cd teams-ai/js/samples/06.auth.messageExtensionSSO/
43-
yarn start
42+
cd teams-ai-/js/samples/06.auth.oauth.messageExtension
4443
```
4544

45+
4. Jump to [Multiple ways to test](#multiple-ways-to-test).
46+
4647
## Interacting with the bot
4748

4849
![Bot interaction image](https://github.com/OfficeDev/Microsoft-Teams-Samples/raw/main/samples/msgext-search-auth-config/csharp/Images/msgext-search-auth-config.gif)
@@ -92,7 +93,7 @@ You can also use the Teams Toolkit CLI to run this sample.
9293
1. In the repository directory, run the Teams Toolkit CLI commands to automate the setup needed for the app
9394
9495
```bash
95-
cd teams-ai/js/samples/06.auth.messageExtensionSSO/
96+
cd teams-ai-/js/samples/06.auth.oauth.messageExtension
9697
teamsfx provision --env local
9798
9899
```
@@ -113,10 +114,10 @@ You can also use the Teams Toolkit CLI to run this sample.
113114
114115
> If you used Teams Toolkit in the above steps, you can [upload a custom app](https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/deploy-and-publish/apps-upload) to a desktop client using the `/appPackage/appPackage.local.zip` file created by the tools and skip to step 6.
115116
116-
1. In a terminal, navigate to `teams-ai/js/samples/06.auth.messageExtensionSSO/`
117+
1. In a terminal, navigate to `teams-ai-/js/samples/06.auth.oauth.messageExtension`
117118
118119
```bash
119-
cd teams-ai/js/samples/06.auth.messageExtensionSSO/
120+
cd teams-ai-/js/samples/06.auth.oauth.messageExtension
120121
```
121122
122123
1. Run ngrok tunneling service - point to port 3978

js/samples/06.auth.oauth.messageExtension/teamsapp.local.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,7 @@ provision:
101101
# Defines what the `deploy` lifecycle step does with Teams Toolkit.
102102
# Runs after `provision` during Start Debugging (F5) or run manually using `teamsfx deploy --env local`.
103103
deploy:
104-
# Ensures that the project dependnecies are installed.
105-
- uses: cli/runNpmCommand
106-
with:
107-
args: install --no-audit
108-
109-
# Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`.
104+
# Provides the Teams Toolkit .env file values to the apps runtime so they can be accessed with `process.env`.
110105
- uses: file/createOrUpdateEnvironmentFile
111106
with:
112107
target: ./.env

0 commit comments

Comments
 (0)