0
  1. I have a front end in react and a backend in asp.net core web api.
  2. I have already a login with jwt tokens and register using hashing and salt to store in db.
  3. I want to implement an email confirmation when the user registers in my site.
  4. Should i use jwt to generate token and send this jwt in the email to user

Im not finding much solutions, need some suggestions

Ricardo Nuno
  • 89
  • 1
  • 8

1 Answers1

0

a typical way of building an email validation thing, with a one time code, would be to use a GUID. In the email you sent, add a link with this unique GUID attached at the end something like :

www.something.com/email-verify/877ebd19-6852-4de9-b228-4d796a4cd7c7

you create a table in your db where you store these generated tokens with the a user id so you know which user it is when they click the link, add a used flag so you know you only accept it once and you're pretty much done.

Andrei Dragotoniu
  • 6,155
  • 3
  • 18
  • 32
  • THANKS ur the man, there is not really a tutorial or video that explains what is the industry standard for this.Im really apreciated – Ricardo Nuno Mar 12 '20 at 13:25