nss-day-cohort-46 / rare-server-groovy-goblins

rare-server-groovy-goblins created by GitHub Classroom
0 stars 2 forks source link

Cr basic auth #50

Closed CheoR closed 3 years ago

CheoR commented 3 years ago

Description

When user is a the login page, if they have already registered and log in with their correct credentials they are redirected to the home page. Else they are given an error modal.

Closes #2

Type of change

Testing Instructions

git fetch --all git checkout cr-basic-auth watchgod request_handler.main

If you do not already have a user registered, In your rare.sql file, add and run:


INSERT INTO Users (
    'first_name',
    'last_name',
    'email',
    'bio',
    'username',
    'password',
    'profile_image_url',
    'created_on',
    'active'
  )
VALUES(
    'test',
    'mctest',
    'test@test.com',
    'I test things.',
    'test@test.com',
    'test',
    '',
    DATE(),
    'True'
  );
-- SELECT *  FROM Users;

In another tab, navigate to the client-side directory

npm start

In the browser, visit the login page at

http://localhost:3000/login

Successful login will take you to the home page, else a modal will pop up.

Checklist: