簡體   English   中英

沒有ASP.NET身份的電子郵件確認和密碼策略

[英]Email confirmation and Password Policy Without ASP.NET Identity

我在我的項目中使用OWIN表單身份驗證,而不使用MVC模板生成的任何Identity特定類。

我想在我的項目中實現電子郵件確認和密碼策略。 我不確定如何實現這一點,因為我的項目中沒有與Identity相關的類,因為我不想使用它們。 我對OWIN表單身份驗證感到滿意。

有沒有辦法通過電子郵件驗證並使用OWIN表單身份驗證創建密碼策略?

我不是專家,但是你可以,要驗證電子郵件地址你可以發送電子郵件與Guid作為QueryString並添加頁面檢查ID Guid是真的然后標記用戶確認你的意思是這樣嗎?

     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}
     }}

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM