Getting checked for username instead of email attribute in Identity framework in ASP.NET Core MVC
I wanted to ask the question here but the character limit won't let me.
I have posted it on Stack Overflow. Please answer this.
https://stackoverflow.com/questions/78583462/getting-checked-for-username-instead-of-email-attribute-in-identity-framework-in
Stack Overflow
Getting checked for username instead of email attribute in Identity...
I am trying to add a custom input field to my register page of Identity frame in ASP.NET Core MVC.
By default, the AspNetUsers table in the database has a column UserName already it is passed Email...
1 Reply
.PasswordSignInAsync()
takes a string as the first value. It just so happens, that what gets passed to the first field in the login is named Email
. Rename this property to PrettyGreenApple
and it will work all the same. The names of variables passed into methods do not matter in the slightest.
So just change the code to
Login.cshtml.cs:
OnPostAsync method:
if it's something that bothers you