❔ Massive issue with Authentication

So im trying to add server password handling but instead of making my own handler im forced to implement some AuthenticationHandler for it, which I did, but now the AuthenticateResults aren't even being given to the request user so its useless, and the Authentication Checks are being ran on every Endpoint instead of the ones i added [Authorize(myStuff)] into, and i have no idea what to do
Program.cs:
            var builder = WebApplication.CreateBuilder(args);

            builder.Services.AddAuthentication(options =>
            {
                
            }).AddScheme<Utils.ServerKeyAuthenticationOptions, Utils.ServerKeyAuthenticationHandler>("serverPass", options => { });

            builder.Services.AddControllers();
            
            ConfigureServices(builder.Services);
            var app = builder.Build();
            
            app.UseHttpsRedirection();

            app.UseMiddleware<Utils.RequestCounter>();


            app.UseRouting();
            app.UseAuthentication();
            app.UseAuthorization();
            app.MapControllers();
Was this page helpful?