ashleighctucker/OpenTableClone

Refactor Login on Back-end

Closed this issue · 0 comments

Currently when you try to log in with an email that isn't in the db, it returns a message saying:

  • on the email field: "email provided not found"
  • on the password field: "no such user exists"

Typically we would return something more vague just saying that the login failed etc., so that nobody can use our login form to figure out the email addresses of our users

User Story: Login

  • As a registered and unauthorized user, I want to be able to log in to the website via a log-in form.
    • When I'm on the /login page: (will use modal pop up not page log in!)
      • I would like to be able to enter my email and password on a clearly laid out form.
      • I would like the website to log me in upon successful completion of the log in form.
  • When I enter invalid data on the log in form:
    • I would like the website to inform me of the validations I failed to pass, and repopulate the form with my valid entries (except my password).