Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Email confirmation and Password Policy Without ASP.NET Identity

I am using OWIN form authentication in my project and not using any Identity specific classes that MVC templates generate.

I want to implement email confirmation and a password policy in my project. I'm not sure how this can be accomplished, as I don't have Identity related classes in my project as I don't want to use those. I am happy with the OWIN form authentication.

Is there any way I can verify via email and create a password policy by using OWIN form authentication?

like image 485
InTheWorldOfCodingApplications Avatar asked Apr 19 '16 14:04

InTheWorldOfCodingApplications


People also ask

Why would you use ASP NET identity?

ASP.NET Identity can be used with all ASP.NET frameworks, such as ASP.NET Web Forms , MVC, Web Pages, Web API etc.ASP.NET Identity has been developed with some major security features like Two-Factor Authentication, Account Lockout, and Account Confirmation etc.

Is ASP.NET Core identity secure?

ASP.NET Core provides many tools and libraries to secure ASP.NET Core apps such as built-in identity providers and third-party identity services such as Facebook, Twitter, and LinkedIn.


1 Answers

I am not expert but Yes you can , To verify Email address you can send email with Guid as QueryString and add page to check id Guid is true and then flag user as confirmed did you mean like this ?

     Send Email as html :
    body = "<b>Wellcom Mr " + Username + " </b>";
     body += "<br />";
     body += "<b><a href=http://YourDomain/checkuseremail.aspx?       
    UserId=" + userId + " style='display:block; '>confirm</a></b>";


     public partial class checkuseremail: System.Web.UI.Page
    {
   protected void Page_Load(object sender, EventArgs e)
    {
    string id = Request.QueryString["UserID"];
     if(id != null){ select user id if email correct redirct to success page  and flag user as confirmed} 

      else {redirct to error page}
     }}
like image 172
Moayad Myro Avatar answered Nov 02 '22 15:11

Moayad Myro