No authentication handler is registered for the scheme 'Cookies'. The registered schemes are: Bearer. ... means a policy asked ASP.NET Core to authenticate with a scheme name that has no handler behind it. The message lists the schemes that do exist: either register a handler for the missing one or change the name to one in that list.

In this test a policy asked for Cookies while the app had only added JWT bearer. Adding .AddCookie() to the authentication builder made the error go away. Pointing the policy at Bearer instead, without .AddCookie(), removed it too; both runs are shown below.

The error

A request without a token to the protected endpoint got a 500 with the Development exception page as plain text, and the server console logged the same exception:

PS> curl.exe -s -i http://127.0.0.1:15630/reports
HTTP/1.1 500 Internal Server Error
Content-Type: text/plain; charset=utf-8
Date: Sat, 14 Nov 2026 01:15:48 GMT
Server: Kestrel
Transfer-Encoding: chunked

System.InvalidOperationException: No authentication handler is registered for the scheme 'Cookies'. The registered schemes are: Bearer. Did you forget to call AddAuthentication().Add[SomeAuthHandler]("Cookies",...)?
   at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authentication.AuthenticationServiceImpl.AuthenticateAsync(HttpContext context, String scheme)
   at Microsoft.AspNetCore.Authorization.Policy.PolicyEvaluator.AuthenticateAsync(AuthorizationPolicy policy, HttpContext context)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
...

Why it happens

A scheme is a name plus a handler. AddAuthentication("Bearer") only sets a default name; .AddJwtBearer() or .AddCookie() is what registers a handler under a name. The app had one handler, named Bearer, and a policy that named another:

...
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme).AddJwtBearer();
builder.Services.AddAuthorization(options =>
{
    options.AddPolicy("StaffOnly", policy => policy
        .AddAuthenticationSchemes(CookieAuthenticationDefaults.AuthenticationScheme)
        .RequireAuthenticatedUser());
});
...

CookieAuthenticationDefaults.AuthenticationScheme is the string "Cookies". The stack trace shows where it failed: the authorization middleware's policy evaluator called AuthenticateAsync with that name. The app started without a warning; the error came with the first request to the endpoint.

A related case looks different. With AddAuthentication(JwtBearerDefaults.AuthenticationScheme) and no .AddJwtBearer() at all, the same request in this lab did not print this message: it printed "No authenticationScheme was specified, and there was no DefaultChallengeScheme found", which has its own post.

The fix

...
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
    .AddJwtBearer()
    .AddCookie();
...

The policy stayed as it was. The same request now got the cookie handler's answer to an anonymous caller, a redirect to its default login path:

PS> curl.exe -s -i http://127.0.0.1:15630/reports
HTTP/1.1 302 Found
Content-Length: 0
Date: Sat, 14 Nov 2026 01:15:51 GMT
Server: Kestrel
Location: http://127.0.0.1:15630/Account/Login?ReturnUrl=%2Freports

If the policy was copied from another app and this API only uses tokens, change the name instead. With .AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme) in the policy and no .AddCookie(), the same request got the bearer handler's answer:

PS> curl.exe -s -i http://127.0.0.1:15630/reports
HTTP/1.1 401 Unauthorized
Content-Length: 0
Date: Sat, 14 Nov 2026 01:28:30 GMT
Server: Kestrel
WWW-Authenticate: Bearer

Either way, copy the scheme name from the "registered schemes are" part of the message rather than typing it.

How it was reproduced

A minimal API made with dotnet new web -f net10.0 on SDK 11.0.100, with Microsoft.AspNetCore.Authentication.JwtBearer 10.0.0, running on Microsoft.AspNetCore.App 10.0.15 in the Development environment, built and started by a small script, start.ps1, which runs dotnet build -nologo -v q in the project folder and then bin\Debug\net10.0\FixLab.exe --urls http://127.0.0.1:15630. One curl.exe request without a token triggered the exception; the same request after adding .AddCookie() returned 302.

Frequently asked

What does 'No authentication handler is registered for the scheme' mean?
Something asked ASP.NET Core to authenticate with a scheme name that no AddJwtBearer, AddCookie or other handler call registered. The message lists the names that are registered.
Does AddAuthentication("Bearer") register the JWT handler?
No. It only sets the default scheme name. The handler comes from AddJwtBearer(). In the test, the default name alone without a handler gave the 'No authenticationScheme was specified' error instead.
How do I fix the 'Cookies' scheme error in an API that uses JWT?
Either register the cookie handler with AddCookie(), or change the policy or attribute to use the Bearer scheme that is registered. The message's list of registered schemes shows the valid names.

More decoded errors in the Fixes category.