diff --git a/MediaFeeder/MediaFeeder/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs b/MediaFeeder/MediaFeeder/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs index 2bd0293..4ce3889 100644 --- a/MediaFeeder/MediaFeeder/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs +++ b/MediaFeeder/MediaFeeder/Components/Account/IdentityComponentsEndpointRouteBuilderExtensions.cs @@ -21,7 +21,7 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn var accountGroup = endpoints.MapGroup("/Account"); - accountGroup.MapGet("/PerformExternalLogin/{provider}", [AllowAnonymous] static ( + accountGroup.MapGet("/PerformExternalLogin/{provider}", static ( HttpContext context, [FromServices] SignInManager signInManager, [FromRoute] string provider, @@ -40,9 +40,9 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn var properties = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl); return TypedResults.Challenge(properties, [provider]); - }); + }).AllowAnonymous(); - accountGroup.MapPost("/PerformExternalLogin", [AllowAnonymous] static ( + accountGroup.MapPost("/PerformExternalLogin", static ( HttpContext context, [FromServices] SignInManager signInManager, [FromForm] string provider, @@ -61,7 +61,7 @@ public static IEndpointConventionBuilder MapAdditionalIdentityEndpoints(this IEn var properties = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl); return TypedResults.Challenge(properties, [provider]); - }); + }).AllowAnonymous(); accountGroup.MapPost("/Logout", static async ( [FromServices] SignInManager signInManager,