diff --git a/samples/apps/auth-api-webapp-react/.env b/samples/apps/auth-api-webapp-react/.env.example similarity index 100% rename from samples/apps/auth-api-webapp-react/.env rename to samples/apps/auth-api-webapp-react/.env.example diff --git a/samples/apps/auth-api-webapp-react/README.md b/samples/apps/auth-api-webapp-react/README.md index d4f7f4aa5aee..74952b42edd9 100644 --- a/samples/apps/auth-api-webapp-react/README.md +++ b/samples/apps/auth-api-webapp-react/README.md @@ -12,7 +12,7 @@ 1. You will need an [Open AI Key](https://openai.com/api/) or [Azure Open AI Service key](https://learn.microsoft.com/azure/cognitive-services/openai/quickstart) for this sample -2. Ensure the KernelHttpServer sample is already running at `http://localhost:7071`. If not, follow the steps +2. Ensure the KernelHttpServer sample is already running at `http://localhost:7071`. If not, follow the steps to start it [here](../../dotnet/KernelHttpServer/README.md). 3. You will also need to [register your application](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app) @@ -20,11 +20,12 @@ [here](https://learn.microsoft.com/azure/active-directory/develop/quickstart-register-app). - Select **`Single-page application (SPA)`** as platform type, and the Redirect URI will be **`http://localhost:3000`** - Select **`Personal Microsoft accounts only`** as supported account types for this sample -4. Once registered, copy the **Application (client) ID** from the Azure Portal and paste - the GUID into the **[.env](.env)** file next to `REACT_APP_GRAPH_CLIENT_ID=` (first line of the .env file). -5. **Run** the following command `yarn install` (if you have never run the sample before) +4. Copy **[.env.example](.env.example)** into a new file with name "**.env**". +5. Once registered, copy the **Application (client) ID** from the Azure Portal and paste + the GUID into the **.env** file next to `REACT_APP_GRAPH_CLIENT_ID=` (first line of the .env file). +6. **Run** the following command `yarn install` (if you have never run the sample before) and/or `yarn start` from the command line. -6. A browser will automatically open, otherwise you can navigate to `http://localhost:3000` to use the sample. +7. A browser will automatically open, otherwise you can navigate to `http://localhost:3000` to use the sample. ## About the Authenticated API’s Sample @@ -45,7 +46,8 @@ Each function will call Microsoft Graph and/or Open AI to perform the tasks. ### unauthorized_client: The client does not exist or is not enabled for consumers. 1. Ensure in your Application Manifest that **`Personal Microsoft accounts`** are allowed to sign in. - - `"signInAudience": "PersonalMicrosoftAccount"` or - - `"signInAudience": "AzureADandPersonalMicrosoftAccount"` -2. If you are not able to change the manifest, create a new Application following the instructions in [Running the sample](#running-the-sample), step 3. \ No newline at end of file + - `"signInAudience": "PersonalMicrosoftAccount"` or + - `"signInAudience": "AzureADandPersonalMicrosoftAccount"` + +2. If you are not able to change the manifest, create a new Application following the instructions in [Running the sample](#running-the-sample), step 3. diff --git a/samples/apps/book-creator-webapp-react/.env b/samples/apps/book-creator-webapp-react/.env.example similarity index 100% rename from samples/apps/book-creator-webapp-react/.env rename to samples/apps/book-creator-webapp-react/.env.example diff --git a/samples/apps/chat-summary-webapp-react/.env b/samples/apps/chat-summary-webapp-react/.env.example similarity index 100% rename from samples/apps/chat-summary-webapp-react/.env rename to samples/apps/chat-summary-webapp-react/.env.example diff --git a/samples/apps/github-qna-webapp-react/.env b/samples/apps/github-qna-webapp-react/.env.example similarity index 100% rename from samples/apps/github-qna-webapp-react/.env rename to samples/apps/github-qna-webapp-react/.env.example