Goodbye Javascript! Build an Authenticated Web App in C# with Blazor + ASP.NET Core 3.0

Goodbye Javascript! Build an Authenticated Web App in C# with Blazor + ASP.NET Core 3.0

Tutorial: Build a frontend application with C# (without Javascript)!

Sink Bobo

Hi. Thank your for the article. I’m getting an error when clicking on Login(Using VS). “Sorry, there’s nothing at this address.”

Ray Hayes

Same here.

Richard Corkery

Same here. Using Visual Studio. @ray_hayes or @sinkbobo were either of you able to fix? If so, how?

Ray Hayes

Not yet.

Richard Corkery

Has anyone been able to get this demo to work? I tried both Visual Studio and VS Code. Both times I am getting “Sorry, there’s nothing at this address.” If anyone has had success setting this up let me know. I must doing something wrong.

Richard Corkery

@ray_hayes Have you tried VS Code? I tried both. Neither work.


One of countless samples that don’t work. I’ve found only one blazor auth sample that actually works. It’s on auth0, however I assume one can use and adjust it for the okta sample:…

Issac Vale

Those who have issues with the code here can see a solution to the issues they face in stackoverflow:

Richard Corkery

Just to confirm, using the steps in BOTH posts I was able to successfully Authenticate and Authorize using Blazor and okta.

Also, as far as I can tell, you can skip the step related to installing the okta sdk listed above. It does not look like it is needed if you follow the stackoverflow steps.

Heather Downing

This post has been updated to better clarify and reflect changes needed in the general release of Blazor.


I was getting a ‘Correlation Error’ upon authentication, and discovered that SSL may be required for this to work. It’s the only way I could get it to work, enable SSL and use that port instead of the default App port. My project targets .NET Core 3.1


I’ve had success, but only after figuring out where the documentation is lacking and resolving those issues myself. The sorry, there’s nothing at this address error is related to routing not being properly setup.

Richard Corkery

I had success as well. See Issac and my post above.

armando restrepo

How can I get authorization code back in order to get tokens to use my secured resources of my rest api? For web flow it supposed to come back in query string.


I had an issue after following this guide where my sign out function was not properly logging out of the Okta middleware. As a result, if you logged into the app and logged out within a certain timeframe (then logged back in), you would not be prompted for credentials on the second login. To resolve this I needed to add the Okta.AspNetCore nuget package and use this code… to sign out of the Okta middleware.

My project targets .NET 5


Hi! I’m wondering if it is possible to do away with the Login/Logout pages. In enterprise, we are already logged into our machines with SSO and the execs expects a seamless login to the dashboard of an enterprise web app if SSO like okta is used. How do I use okta in such a way that when I go to the URL of my site (plus any path to specific page with parameters), I get redirected to okta, get signed in automatically or do sign in and ger redirected back with the return URL in blazor server side?