Skip to content

Commit 92f3ed3

Browse files
authored
Merge pull request #33950 from dotnet/main
2 parents df9297d + bc17591 commit 92f3ed3

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

aspnetcore/blazor/security/blazor-web-app-with-oidc.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ For local development testing, use the [Secret Manager tool](xref:security/app-s
6767
> [!NOTE]
6868
> If the app uses Microsoft Entra ID or Azure AD B2C, create a client secret in the app's registration in the Entra or Azure portal (**Manage** > **Certificates & secrets** > **New client secret**). Use the **Value** of the new secret in the following guidance.
6969
70-
Execute the following command in a command shell from the server project's directory, such as the Developer PowerShell command shell in Visual Studio. The `{SECRET}` placeholder is the client secret obtained from the app's registration:
70+
The [sample app](#sample-app) hasn't been initialized for the Secret Manager tool. Use a command shell, such as the Developer PowerShell command shell in Visual Studio, to execute the following command. Before executing the command, change the directory with the `cd` command to the server project's directory. The command establishes a user secrets identifier (`<UserSecretsId>` in the server app's project file):
71+
72+
```dotnetcli
73+
dotnet user-secrets init
74+
```
75+
76+
Execute the following command to set the client secret. The `{SECRET}` placeholder is the client secret obtained from the app's registration:
7177

7278
```dotnetcli
7379
dotnet user-secrets set "Authentication:Schemes:MicrosoftOidc:ClientSecret" "{SECRET}"
@@ -323,7 +329,13 @@ For local development testing, use the [Secret Manager tool](xref:security/app-s
323329
> [!NOTE]
324330
> If the app uses Microsoft Entra ID or Azure AD B2C, create a client secret in the app's registration in the Entra or Azure portal (**Manage** > **Certificates & secrets** > **New client secret**). Use the **Value** of the new secret in the following guidance.
325331
326-
Execute the following command in a command shell from the server project's directory, such as the Developer PowerShell command shell in Visual Studio. The `{SECRET}` placeholder is the client secret obtained from the app's registration:
332+
The [sample app](#sample-app) hasn't been initialized for the Secret Manager tool. Use a command shell, such as the Developer PowerShell command shell in Visual Studio, to execute the following command. Before executing the command, change the directory with the `cd` command to the server project's directory. The command establishes a user secrets identifier (`<UserSecretsId>` in the server app's project file):
333+
334+
```dotnetcli
335+
dotnet user-secrets init
336+
```
337+
338+
Execute the following command to set the client secret. The `{SECRET}` placeholder is the client secret obtained from the app's registration:
327339

328340
```dotnetcli
329341
dotnet user-secrets set "Authentication:Schemes:MicrosoftOidc:ClientSecret" "{SECRET}"

0 commit comments

Comments
 (0)