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(login): implement authentication feature #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rpheredia
Copy link
Owner

Changes

Implement a login system with authentication feature.

  1. Create new page to enable creation of new user accounts. Add email format validation to the user field.
  2. Add login procedure for verification of password in application frontend.
  3. Create new Collection to store user accounts in MongoDb in server.
  4. Modify server to encrypt password before storing in database.

Purpose

The current application have no user account login system. All login attempts are allowed. See Shift3#11

Approach

  1. Add a "Sign Up" page which is linked from the login page. Add 'validator' package for email validation.
  2. Create new endpoint in server to add new user. Install bcryptjs package to encrypt password before storing in database.
  3. Add create user function with API call to server in the redux actions. Call this function from sign up page.
  4. Login procedure in front end awaits for the result from backend, and displays error if incorrect user or password is entered or authenticates properly if correct.

Testing Steps

  1. Click on "Create New Account" link on the Login Page.
  2. Enter a new valid email and password. If email is invalid, you should not be able to proceed.
  3. Click the "Create Account" button. You should be redirected to login page.
  4. Login with credentials for new account. If incorrect credentials entered, you should not be redirected to View Orders.

Fixes Shift3#11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bonus Feature: Login System
1 participant