Blazor Security Docs and Blog Posts

Introduction

I’m coming to Blazor with a WPF, Xamarin, and Angular background.  I’ve done a good bit of full .NET Framework Web API and .NET Core Web API.  But, I’ve not done any MVC or Razor page development.

As a result, many concepts in Blazor are new to me, especially the security model, having never used any of it.

An additional twist is that Blazor apps can be either server-side or client-side, each has different requirements.

I put this list of resources for myself, so I can get up to speed and for others who need to master these APIs.

Thoughts

If I was writing a public app, I would use Google, OAuth, Twitter, etc. authentication so that I didn’t have to have any forms or code to create an account, change password, forgot my password, etc.

For blog posts apps with multiple logins, internal authentication is easier so those blog readers don’t have to create multiple 3rd party accounts to use your app.  Moo2U is such an app as I have an admin, drivers 1 – 4, and many pubic e-commerce user logins.

Blazor Authentication and Authorization Resources

Blazor Docs

https://docs.microsoft.com/en-us/aspnet/core/security/blazor/?view=aspnetcore-3.0&tabs=visual-studio

Steve Sanderson Authentication and Authorization

https://gist.github.com/SteveSandersonMS/175a08dcdccb384a52ba760122cd2eda

Shaun Walker Oqtane blog post Authentication in Blazor

https://www.oqtane.org/Resources/Blog/PostId/527/exploring-authentication-in-blazor

Shaun Walker Oqtane Framework demonstration of a login form that works server or client-side.

https://github.com/oqtane/oqtane.framework/blob/master/Oqtane.Client/Modules/Admin/Login/Index.razor

Chris Sanity Security Series

https://chrissainty.com/securing-your-blazor-apps-introduction-to-authentication-with-blazor/

Michael Washington server-side cookie authentication

http://blazorhelpwebsite.com/Blog/tabid/61/EntryId/4316/A-Demonstration-of-Simple-Server-side-Blazor-Cookie-Authentication.aspx

Michael Washington server-side Google authentication

http://blazorhelpwebsite.com/Blog/tabid/61/EntryId/4356/Google-Authentication-in-Server-Side-Blazor.aspx

Ed Charbeneau Authentication and Authorization

https://edcharbeneau.com/blazor-authentication-authorization/

Visual Studio Magazine

https://visualstudiomagazine.com/articles/2019/06/13/aspnet-core-preview-6.aspx

Heather Downing Build an Authenticated Web App in C# with Blazor + ASP.NET Core 3.0 (App uses 3rd party auth with https://www.okta.com/)

https://scotch.io/tutorials/goodbye-javascript-build-an-authenticated-web-app-in-c-with-blazor-aspnet-core-30

Mike Brind Simple Authentication In Razor Pages Without A Database

https://www.mikesdotnetting.com/article/335/simple-authentication-in-razor-pages-without-a-database

Close

If you know of more resources, please post a comment or hit me up on Twitter and I’ll add them.

Thank you and have a great day,

Just a grain of sand on the world’s beaches.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s