Login & Sign module with email confirmation, forgot my password and JWT Authentification
I will explain how this API works, we'll look dependence modules, and finally we will review the entire implementation.
- Allows to fill a basic form to register as a new user. (This form will validate that the fields are ok and that all required fields are filled).
- The user is stored in a database of our backend (the password is stored encrypted) then an email is sent to validate the new account.
- The confirmation email will activate the account created
- A login form, validate that 'user' & 'password' are correct and by Jason Web Token will provide the user token
- The authentication token can be stored using localStorage or sessionStorage in the terminal user to avoid having to make new login.
- Forgot my password option, allow you to send an email to change the password using a new form with a token that will expire at 2 min.