# Blazor Server Quickstart Issues

**URL:** <https://community.auth0.com/t/blazor-server-quickstart-issues/198990>\
**Category:** Product Feedback\
**Tags:** quickstart, blazor, auth0\
**Created:** [April 15, 2026, 4:51pm UTC](https://community.auth0.com/t/blazor-server-quickstart-issues/198990 "2026-04-15T16:51:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jon-Corey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jon-corey/32/74941_2.png) [@Jon-Corey](https://community.auth0.com/u/Jon-Corey)\
**Post date:** [April 15, 2026, 4:51pm UTC](https://community.auth0.com/t/blazor-server-quickstart-issues/198990/1 "2026-04-15T16:51:06Z")

</div>

I just went through the process of adding Auth0 to a Blazor Server application using the Blazor Server Quickstart. I had some issues and figured I’d report them so that they can be fixed and the next developers to use the Quickstart have an easier time.

The Blazor Server Quickstart I’m referencing throughout: [Add Login to Your Blazor Server Application - Auth0 Docs](https://auth0.com/docs/quickstart/webapp/aspnet-core-blazor-server)

1. Step 3 says to add the Client Secret to appsettings.json. This works, but it does mean that the Client Secret could be exposed if the developer commits their code to a remote repository. It may be worth adding a note mentioning ASP.NET’s secrets.json feature: [Safe storage of app secrets in development in ASP.NET Core | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets)

2. Step 5 says to add 6 files to handle login and logout. Some of those are Razor pages, which seem a bit out of place in a Blazor app. In my opinion, this is a lot of extra fluff and clutter that is unnecessary. I believe a simpler and easier option would be to use Minimal API endpoints to map /login and /logout. Here’s the code I used in my own app. This code can be added to Program.cs directly or split off into a separate file.

```csharp
app.MapGet("/Login", async (HttpContext httpContext, string returnUrl = "/") =>
{
    var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
        .WithRedirectUri(returnUrl)
        .Build();

    await httpContext.ChallengeAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);
});

app.MapGet("/logout", async (HttpContext httpContext) =>
{
    var authenticationProperties = new LoginAuthenticationPropertiesBuilder()
        .WithRedirectUri("/")
        .Build();

    await httpContext.SignOutAsync(Auth0Constants.AuthenticationScheme, authenticationProperties);

    await httpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
});

```

This code has the advantage of being less work to set up, fewer files in the repo, and less boilerplate while accomplishing the same thing.

1. When I referenced a particular step to the on-page AI, it kept getting the step number wrong. For example, if I say “Which step says to add values to appsettings.json?”, it replies with “Step 2: Setup Auth0 Application Configuration is the step that instructs you to add your Auth0 `Domain`, `ClientId`, and `ClientSecret` values to `appsettings.json`.” (it’s actually step 3). The AI consistently said the wrong step number every time it mentioned a step. This came up a few times during normal queries, not just a direct question like this.

2. The Sample Application link at the bottom of the guide [https://github.com/auth0-samples/auth0-aspnetcore-blazor-server-samples/tree/main/Quickstart/Sample](https://github.com/auth0-samples/auth0-aspnetcore-blazor-server-samples/tree/main/Quickstart/Sample) is not relevant to this guide. It uses an old version of .NET and doesn’t follow the steps in the Quickstart guide, so the code is significantly different from what the guide says to do. It seems like the guide was updated, but the sample app wasn’t.

I hope this is helpful!

---

<div class="post-metadata">

**Author:** ![nik.baleca](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/nik.baleca/32/68749_2.png) [@nik.baleca](https://community.auth0.com/u/nik.baleca)\
**Post date:** [April 15, 2026, 6:51pm UTC](https://community.auth0.com/t/blazor-server-quickstart-issues/198990/2 "2026-04-15T18:51:24Z")

</div>

Hi @Jon-Corey

Welcome back to the Auth0 Community!

Thank you for submitting this feedback card regarding the SDK. I would highly recommend to also open an [Issue on the repository’s page](https://github.com/auth0-samples/auth0-aspnetcore-blazor-server-samples/issues) stating the above in order to raise attention to the team in charge of it as well!

Kind Regards,  
Nik

---

<div class="post-metadata">

**Author:** ![Jon-Corey](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/jon-corey/32/74941_2.png) [@Jon-Corey](https://community.auth0.com/u/Jon-Corey)\
**Post date:** [April 15, 2026, 7:19pm UTC](https://community.auth0.com/t/blazor-server-quickstart-issues/198990/3 "2026-04-15T19:19:47Z")

</div>

Some corrections/additions since I can’t edit the original post:

1. The login and logout URLs should be `/Account/Login` and `/Account/Logout` since those are the default URLs that ASP.NET/OIDC will redirect to.

2. The alternate solution I suggested in issue #2 is the recommended approach from another official Auth0 guide: [Add Auth0 Authentication to Blazor Web Apps](https://auth0.com/blog/auth0-authentication-blazor-web-apps/)

3. As recommended by @nik.baleca, I have created an issue on the GitHub repo for the sample app: [Quickstart Guide Issues · Issue #18 · auth0-samples/auth0-aspnetcore-blazor-server-samples · GitHub](https://github.com/auth0-samples/auth0-aspnetcore-blazor-server-samples/issues/18)
