Skip to content

Using Multiple authentication scheme I am experiencing recursion  #54929

@Notamatall

Description

@Notamatall

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

I have tried to configure .NET 8 application which uses multiple authentication schemas. In my case I am trying to use cookie and JWTBearer.
I have also added configuration for authentication which allows to dynamically select authentication schema. ( this is crucial to reproduce bug).
Additionally I have defined policy which uses Requirement - AuthorizationHandler which requires User to be enabled.
If Requirement is not Succeeded, request goes into recursion -> authentication -> authorization handler -> forbidden endpoint.

Expected Behavior

I expect that is should just return me 403.

Steps To Reproduce

Way to reproduce -> login with cookie -> requst GetWithCookie endpoint of ContentController.
project which repoduces

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

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