Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I customize ASP.NET Core Identity in Server-Side Blazor?

For normal MVC-style websites, I get a set of pre-generated pages for ASP.NET Core Identity that I can customize. With it I can do things like ask for the user's age on the registration page.

What is the equivalent for server-side Blazor?

like image 227
Jonathan Allen Avatar asked Jan 20 '26 03:01

Jonathan Allen


1 Answers

The difference you see is not directly related to Blazor but is present in all AspNetCore > 2.x projects.
The GUI is inside a set of 'canned' Razor pages inside a package.

When you have used the right starter template you should already see an Areas folder with a few files in it.

Right-click your project, choose Add, New Scaffolded Item, Identity.

The selected Razor pages are now extracted to your project and you can alter them. You will also need an ApplicationUser : IdentityUser {} but that should be familiar.


You may need to fix a few things after applying the scaffolding. See https://stackoverflow.com/a/57663817/60761

like image 137
Henk Holterman Avatar answered Jan 23 '26 19:01

Henk Holterman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!