MudBlazor / Templates

Ready to use Blazor Templates in different styles and layout with all the basic setup already done for MudBlazor.
MIT License
745 stars 165 forks source link

Authorization without e-mail problem #487

Open drazen64 opened 2 days ago

drazen64 commented 2 days ago

Application is .Net 8, latest version.

I have a database of users migrated from the legacy application, where they had user names and passwords but no e-mails. Data is now in the AspNetCore.Identity tables.

I created a new project using: dotnet new mudblazor --interactivity Auto --auth Individual --all-interactive

I made two changes in the project:

When I run the application, the user can log in, but then strange things happen with the UI—on each interaction with the application, the user's status changes from authorized to not authorized.

A workaround/fix is to add a bogus e-mail to the user's entry in the database.

It looks like a null value in the UserInfo.Email creates problems.

The original MS Blazor template does not have this problem.

I have a workaround, but I'd like to know if checking e-mail for null can be made somewhere in the template.