dotnet / dotnet/AspNetCore.Docs

.NET 7: Update doc about UseAuthentication() and UseAuthorization() methods

Open
#27,219 3 comments 1 reaction 1 assignee Assigned to @captainsafia View on GitHub
Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

It looks there are some important changes in authentication/authorization configuration in .NET 7. Here https://github.com/dotnet/aspnetcore/pull/42802 we can read that calls to `UseAuthentication()` and `UseAuthorization()` where removed from templates. A few weeks later here https://github.com/dotnet/aspnetcore/commit/63750b9ab756b6b86cba95c44b56e4cc9919ed0e a call to `UseAuthorization()` was added, but there is no call to `UseAuthentication()`. This strange change should be documented. I have found some discussion here https://github.com/dotnet/aspnetcore/issues/39855. Maybe @DamianEdwards or @captainsafia can help.

There are a lot of pages in the documentation where we can see calls to both methods. We can also read that it is important to have UseAutentication before UseAuthorization. All this information have to be verified and corrected.

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 94bfd895-d2af-390b-0801-428b36a27ff4
* Version Independent ID: 0e0d870e-e49a-e16c-c259-68d58e701b8f
* Content: [Introduction to Identity on ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/security/authentication/identity?view=aspnetcore-7.0&tabs=visual-studio)
* Content Source: [aspnetcore/security/authentication/identity.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/identity.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-security**
* GitHub Login: @Rick-Anderson
* Microsoft Alias: **riande**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.