Hello,
I’m trying to reproduce this example :
But I feel that the /callback is not handled by the Auth0 SDK.
I probably miss something.
I’ve created a new project with the visual studio template “ASP.NET Core Web App (Model View Controller)” on the “Additional information” I’ve set :
“Framework” =“.NET 6.0 (Long Term Support)
“Authentication Type” = “None”
Check “Configure for HTTPS”
Uncheck “Enable Docker”
Check “Do not use top-level statments”
the code in my program.cs :
public static void Main(string args)
{
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAuth0WebAppAuthentication(options => {
options.Domain = builder.Configuration[“Auth0:Domain”];
options.ClientId = builder.Configuration[“Auth0:ClientId”];
});
builder.Services.AddControllersWithViews();
var app = builder.Build();
if (!app.Environment.IsDevelopment())
{
app.UseExceptionHandler(”/Home/Error");
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseRouting();
app.UseAuthorization();
app.MapControllerRoute(name: “default”,pattern: “{controller=Home}/{action=Index}/{id?}”);
app.Run();
}
I’m using the nuget package "Auth0.AspNetCore.Authentication 1.0.4 "
the account controller and the views are copy pasted from GitHub - auth0-samples/auth0-aspnetcore-mvc-samples: Auth0 Integration Samples for ASP.NET Core MVC Web Applications ( with namespage changed)
Can you help me ?
Thank you
Geoffroy