Dear all,
I need to implement an email verification mechanism in play after after the user has registered on my website.
I am trying to understand what is the best architecture, this is my guess:
- Define a special route for email validation
- When the user register generate a token and save it inside the cache with a token -> user mapping.
- Send an email containing an url which points to the route providing the token as a parameter
- In the special route controller, retrieve the user from the cache using the token, validate the email and store it in the database.
What do you think ?
Best regards
Edmondo