dotnet / dotnet/AspNetCore.Docs

Should have explanation if multiple AddAuthentication calls were made

Open
#35,097 0 comments 0 reactions 0 assignees View on GitHub
aspnet-core/svc security/subsvc Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 2h
Merged PRs (30d)
109

Description

### Description

When using with Identity, which by default automatically calls `AddAuthentication` method internally, behavior is unknown to developers, if we have our own `AddAuthentication` calls. The explanation should cover the questions:
1. What's the precedence of multiple calls to `AddAuthentication`?
2. What's the result of the authentication configuration options such as default scheme?
3. What's the result of the scheme's configuration options, e.g. if I made my own call to AddCookies using the same scheme name? Will one override another or will they merge?

### Page URL

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/?view=aspnetcore-9.0

### Content source URL

https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/security/authentication/index.md

### Document ID

48e4e204-ea22-c225-0cbc-0d811bdb90ed

### Platform Id

e2c7d18b-1d14-86b4-89b2-5c2e9e7ad404

### Article author

@mjrousos

### Metadata

* ID: 393b3379-6061-50a4-0975-b3d1d82b660b
* PlatformId: e2c7d18b-1d14-86b4-89b2-5c2e9e7ad404
* Service: **aspnet-core**
* Sub-service: **security**

[Related Issues](https://github.com/dotnet/AspNetCore.Docs/issues?q=is%3Aissue+is%3Aopen+48e4e204-ea22-c225-0cbc-0d811bdb90ed)

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.