Skip to content

Should have explanation if multiple AddAuthentication calls were made #35097

@nicholasyin

Description

@nicholasyin

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions