Search code examples
asp.net-mvcasp.net-identity

ASP.NET Identity : Prevent the user to Sign In without email confirmation


Is there any built in way in ASP.NET Identity to prevent user to log in if he hadn't confirm his email?
Currently in my application I can create a new user and be able to sign in without confirming the email. Is there any configuration or something that I have missed or I need to manage this on my own?


Solution

  • ASP.NET Identity doesn't do the job by itself. You have to check if the email has been confirmed by yourself. Please look at the answers to Prevent login when EmailConfirmed is false for details.