PacktPublishing / Web-Development-with-Blazor-Third-Edition

Web Development with Blazor, Third Edition
MIT License
32 stars 25 forks source link

Typo in code in book chapter 8 Authentication and Authorization #6

Open EgonRasmussen opened 6 months ago

EgonRasmussen commented 6 months ago

I found a typo in the book chapter "8 Authentication and Authorization" in section 10. The name of the first parameter should be returnUrl and not redirectUri in Program.cs. The code i GitHub repository is correct:

app.MapGet("account/login", async (string returnUrl, HttpContext
 context) =>
{
    var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
         .WithRedirectUri(returnUrl)
         .Build();
    await context.ChallengeAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);
});

Thanks for an excellent book!

EngstromJimmy commented 5 months ago

Thanks for reporting this, I will add this to the readme.