-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPA authentication and authorization doc #31010
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few changes. @tdykstra I will also have a sample for tokens with comments right after lunch so we can complete that section.
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Jeremy Likness <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing recommendation to go with AppUser
. I thought there was a time that we were trying to drop "My
"-named things, but that just might be my imagination😄.
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
aspnetcore/security/authentication/identity-api-authorization.md
Outdated
Show resolved
Hide resolved
@guardrex I'm following the pattern in the simplified code supplied by Jeremy that uses IdentityUser directly. |
AddApiAuthorization<ApplicationUser, ApplicationDbContext>(options => | ||
{ | ||
options.Clients.AddSPA( | ||
"My SPA", spa => | ||
spa.WithRedirectUri("http://www.example.com/authentication/login-callback") | ||
.WithLogoutRedirectUri( | ||
"http://www.example.com/authentication/logout-callback")); | ||
|
||
options.ApiResources.AddApiResource("MyExternalApi", resource => | ||
resource.WithScopes("a", "b", "c")); | ||
}); | ||
``` | ||
## See also | ||
|
||
## Additional resources | ||
For more information, see the following resources: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Additional resources
is shorter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
@tdykstra ... Very good. I currently left it the original way that @JeremyLikness had it for the Blazor sample (but with |
Using |
Fixes #30066
Fixes #29363
The diff is not useful, the .NET 8 content is in effect a new doc.
Use this internal review link for the new .NET 8 content.
Internal previews