Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#Feat: User authentication #15

Open
2 tasks
mauricioromagnollo opened this issue Aug 11, 2020 · 0 comments
Open
2 tasks

#Feat: User authentication #15

mauricioromagnollo opened this issue Aug 11, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@mauricioromagnollo
Copy link
Owner

mauricioromagnollo commented Aug 11, 2020

Step by step

  • Create server functionality for the user to register by entering email and password;

    • Before saving the user's password to the database, remember to encrypt the password to keep it secure. For this, you can use the bcrypt library;
  • After allowing the creation of a password for all registered users, a route for user login is required. This route should validate the user's password in the database and a good strategy to keep the user logged in for a certain time is to use JWT tokens.

    • To keep the user logged on the cell phone, if he clicks the "Remember me" option, you can save the JWT token in the LocalStorage (Web) or AsyncStorage browser on your mobile application. If he does not select Remember, you can just keep him authenticated during a session (until you close the application).

References

@mauricioromagnollo mauricioromagnollo added the enhancement New feature or request label Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant