Blazor

Authentication and Blazor you own this product

This project is part of the liveProject series Build Web Apps with Blazor
prerequisites
C# (types, generics, namespaces and loops) • .NET ecosystem • .NET SDKs (NET 6.0 and ASP.NET Core) • basic HTML • basic CSS selectors and values • basic Git/GitHub commands and techniques
skills learned
implement authentication and authorization • named HttpClients with HttpClientFactory • page-based authorization • interoperate with JavaScript
Ed Charbeneau
1 week · 6-8 hours per week · INTERMEDIATE

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


Look inside

Add security, an essential ingredient in the recipe for a successful application. As a developer for BellyBox, an online grocery delivery company, your task is to secure the startup’s storefront web application using Blazor’s authentication and authorization features. You’ll keep customers’ identities secret by adding support for anonymous customers using Blazor’s JavaScript interop, then save their data to localStorage. You’ll also modify the checkout process by developing an order history that’s only visible to authenticated users. To handle anonymous and authenticated API traffic, you’ll configure named HttpClient services. By the end of the liveProject, you’ll have mastered services and components for authorizing users in Blazor, and provided a safe and secure online shopping experience for BellyBox’s customers.

This project is designed for learning purposes and is not a complete, production-ready application or solution.

book and video resources

When you start your liveProject, you get full access to the following books and videos for 90 days.

project author

Ed Charbeneau

Ed Charbeneau is a six-time Microsoft MVP and an international speaker, writer, online influencer, a Principal Developer Advocate for Progress Software, and an expert on all things web development.

Ed has shared his insights, experiences, and advice around collaboration, knowledge management, social computing, and training at many industry events around the world. He’s a creative community builder and outside-the-box thinker. He has relationships throughout the world within the areas of internal communications, employee engagement, and marketing as well as IT, with a focus on financial, healthcare, manufacturing, agency, and professional services. He’s defined, architected, and implemented line-of-business solutions with UX best practices and a touch of style that’s all his own.

prerequisites

This liveProject is for .NET developers with C# experience who are looking to modernize their skills with Blazor. To begin these liveProjects you’ll need to be familiar with the following:

TOOLS
  • LINQ
  • Visual Studio (preferred, though Visual Studio Code and the dotnet CLI (Command Line Interface) may be used as an alternative)
TECHNIQUES
  • .NET ecosystem
  • .NET SDKs (NET 6.0 and ASP.NET Core)
  • Basic HTML
  • Basic CSS selectors and values
  • Basic Git/GitHub commands and techniques

you will learn

In this liveProject, you’ll learn to add application security using Blazor’s authentication and authorization features.

  • Create a service that reads and writes data to the browser’s localStorage API using IJSRuntime to bridge JavaScript to C#
  • Use HttpClientFactor to create anonymous and authenticated HttpClient instances by using a Named HttpClient
  • Customize authentication state messages with RemoteAuthenticatorView
  • Use AuthorizeView component to simplify UI markup
  • Use the [Authorize] attribute to enforce authorization on pages that require credentials

features

Self-paced
You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Authentication and Blazor project for free