Here's How an Email based verification system in different applications like Discord, X works
(Explained in the simplest way possible). π
Imagine you're creating a new account. π€
You submit your email, username, and password to the server.
The server immediately hashes your password, creates your account in database with verified: false , and generates a unique verification token.
That token is embedded inside a verification link and sent to your inbox.
When you click the link, your browser sends the token back to the server.
The server validates the token. If it's valid and hasn't expired, it updates your account to verified: true.
Your email is now verified, proving you own that email address. From this point on, your account can access features that require a verified user.
#BackendDevelopment #WebDevelopment