Develop a new user confirmation (email verification)

I am developing an ASP.Net application that should verify that the user is legitimate and not spam. When a new user enters their first name, last name, email address, my application will send an email to authenticate the user. The link will be indicated in the letter, which will confirm the user account.

I am looking for help in that the logic is behind the link by email. As soon as the user clicks on the link, what happens?

I had a website that used Captcha and didn’t have time to stop spamming (I know you cannot stop 100% spamming), similar to Disabling spammers from creating accounts (reCaptcha does not do the trick)

+3
source share
2 answers

As Rook pointed out below, the easiest way is to use Captcha.

If you also need to check your email, see below.


You can create a claim GUID and pass it to the email address that will mark the user as active.

For example, add the ApproIDID column to the users table and generate a new GUID when the user logs in, i.e.

You must mark the user as inactive at this point.

Example Guid 3F2504E0-4F89-11D3-9A0C-0305E82C3301 

Then pass the user ID and GUID in the body of the message

<a href="http://www.mysite.com/verify.aspx?UserId=TheUserId&ApprovalId=3F2504E0-4F89-11D3-9A0C-0305E82C3301">Verify your account</a>

Then a simple verify.aspx page

Code for

string UserId = Request[UserId].ToString(); // You can parse these as Guids
string ApprovalId = Request[ApprovalId].ToString();

TODO:
// Get user from database
// Match QueryString ApprovalId to Column ApprovalId
// Ask user to Log In
// Set user as active
+2
source

, . - Cryptographic Nonce , , .

- capthca, recocmend reCapthca. capthca, .

0

Source: https://habr.com/ru/post/1767705/


All Articles