If you don't want to use:
[Authorize(AuthenticationSchemes="your custom scheme")]
In your project add:
AppContext.SetSwitch("Microsoft.AspNetCore.Authentication.SuppressAutoDefaultScheme", false);
See https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/7.0/default-authentication-scheme for more detail. It's a breaking change from .NET 7.