Call out optional claims for tokens (#22621)

pull/22624/head
Luke Latham 2021-06-26 10:20:30 -05:00 committed by GitHub
parent 79a48fe912
commit d2774a4608
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ The OAuth authentication provider establishes a trust relationship with an app u
* [Other authentication providers](xref:security/authentication/otherlogins)
* [OpenIdConnect](https://github.com/Azure-Samples/active-directory-aspnetcore-webapp-openidconnect-v2)
Optional claims sent in the ID or access token from the authenticaion provider are usually configured in the provider's online portal. For example, Microsoft Azure Active Directory (AAD) permits you to assign optional claims to the app's ID token in the app registration's **Token configuration** blade. For more information, see [How to: Provide optional claims to your app (Azure documentation)](/azure/active-directory/develop/active-directory-optional-claims). For other providers, consult their external documentation sets.
The sample app configures the Google authentication provider with a client ID and client secret provided by Google:
[!code-csharp[](additional-claims/samples/3.x/ClaimsSample/Startup.cs?name=snippet_AddGoogle&highlight=4,9)]