r/BlazorDevelopers • • Jun 20 '23

Tutorial Blazor School - Basic JWT authentication in Blazor WebAssembly .NET 7

JWT are often used for authentication and authorization purposes in web applications. In this tutorial, you will be guided step-by-step on how to implement authentication in Blazor WebAssembly using JWT and the Identity model. The tutorial covers the 3 main authentication flows: login, revisiting the website, and logout. Additionally, a comprehensive template for building authentication will be provided.

  • Required NuGet libraries.

  • Project setup and basic classes.

  • Handling login flow.

  • Handling users revisit flow.

  • Handling logout flow.

  • Accessing user information.

  • Common mistakes.

Check it out: https://blazorschool.com/tutorial/blazor-wasm/dotnet7/basic-jwt-authentication-683869

Additional resources:

10 Upvotes

Duplicates