You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
When there's only one authentication handler registered, AuthenticationSchemeProvider uses it as the default scheme handler for basically everything (authentication, challenge, forbidden, sign-in and sign-out).
Sadly, this logic makes no sense for handlers like ASOS, that throws an InvalidOperationException if you try to call one of the IAuthenticationService methods outside an OpenID Connect request (for obvious security reasons).
Yet, AuthenticationMiddleware uses GetDefaultAuthenticateSchemeAsync() and automatically calls [ASOS].AuthenticateAsync() for each request, which is detected as an invalid operation and causes an exception when ASOS is the only handler registered in the DI container.
Please consider adding a flag to disable this extremely annoying behavior, either at the global level, or per-handler.