Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Login With Email ASP.NET Core 2.0 Razor Pages

$
0
0

When I dove into the default code for the windows default razor page project with authentication I found that the username is automatically set as the email. I was able to change that so users can set their own usernames upon registering. What I then discovered is that the code for logging in uses the username to login NOT the email address. What I would like to do is change it so that people login with their Emails not Usernames.

It all says email, but it is pulling it as the UserName...

            [Required]
            [EmailAddress]
            public string Email { get; set; }
var result = await _signInManager.PasswordSignInAsync(Input.Email, Input.Password, Input.RememberMe, lockoutOnFailure: true);


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>