- ✅ Receive a POST request on /api/signup
- ✅ Validate the required data: name, email, password and passwordConfirmation
- ✅ Validate that password and passwordConfirmation are the same
- ✅ Validate that email field is a valid email
- ✅ Validate if there is already an user with that email
- ✅ Generate a encrypted passsword (this password can not be decrypted)
- ✅ Create an account for the user with provided data, replacing the password by the encrypted one
- ✅ Generate an access token from the user ID
- ✅ Update the user date with the generated token
- ✅ Returns 200 with an access token and user's name
- ✅ Returns a 404 if the API doesn't exists
- ✅ Returns a 400 error if name, email, password and passwordConfirmation are not provided
- ✅ Returns a 400 error if passowrd and passwordConfirmation are not the same
- ✅ Returns a 400 if the email field contains an invalid email
- ✅ Returns a 403 error if the provided email has already been taken
- ✅ Returns a 500 error if something goes wrong when trying to generate a password
- ✅ Returns a 500 error if something goes wrong when trying to create a user's account
- ✅ Returns a 500 error if something goes wrong when trying to generate an access token
- ✅ Returns a 500 error if something goes wrong when tyring to update the user with the access token