Skip to content

User Stories

Yassine Cherradi edited this page Jan 27, 2021 · 6 revisions

Login

As an unauthorized user, I want to be able to login to the website via a form, so that I can access my private information.

Questions

  • Will the user enter a username or an email address to login?
    • User will login via email and password
  • What routes should we use for login?
    • User will login via / route
  • Where should the user be redirected after login?
    • User will be redirected to the /home homepage
  • Will we allow OAuth authentication via a third party?
    • Not yet -- maybe in a future story
  • What happens if the user doesn't exist yet?
    • Display the message Invalid Login please try again.
  • What happens if the user enters the wrong password?
    • Display the message Invalid Login please try again.
  • Should this story include allowing a user to reset their password?
    • Not yet -- maybe in a future story
  • Should logging in use session-based or use token-based authentication?
    • We will use token-based auth for now

Acceptance Criteria

  1. Given that I'm a logged-out user and
    • When I'm on the / route
    • Then there will be a login form with an email and password field and a "Login" button to submit the form.
  2. When I try to fill out the form with an invalid email and password combination and press Enter or press the "Login" button
    • Then at the top of the form, I will see a red message Invalid Login please try again.
  3. When I try to fill out the form with an email that doesn't exist in the system and press Enter or press the "Login" button
    • Then at the top of the form, I will see a red message Invalid Login please try again.
  4. When I try to fill out the form with a valid email and password and press press Enter or press the "Login" button
    • Then I will be redirected to the homepage at the /home route.
  5. Given that I am a logged-in user
    • When I refresh the homepage at the /home route
    • Then I will still be logged in
  6. Given that I am a logged-out user
    • When I try to navigate to the homepage at the /home route
    • Then I will be redirected to the / route

Signup

As an unauthorized user, I want to be able to sign up for the website via a signup form, so that I can access Code Hunt.

Questions

  • Will the user enter a username and an email address to signup?
  • Will we confirm their password during signup?
  • What routes should we use for signup?
  • Where should the user be redirected after signup?
  • Will we allow OAuth authentication via a third party?
  • What happens if the user with the username or email already exists?
  • What happens if the user enters the wrong password confirmation?

Acceptance Criteria

  1. Given that I'm a user who has not signed up yet and
    • When I'm on the /signup route
    • Then there will be a signup form with an email, username, bio, and password field and a "Sign Up" button to submit the form.
  2. When I try to fill out the form with an email or username that already exists with a valid password and press Enter or press the "Sign Up" button
    • Then at the top of the form, I will see a red message User with that email or username already exists.
  3. When I try to fill out the form with a password shorter than 6 characters and press Enter or press the "Sign Up" button
    • Then at the top of the form, I will see a red message Password must be at least 6 characters long.
  4. When I try to fill out the form with a valid email, username, and password and press Enter or press the "Sign Up" button
    • Then I will be redirected to the homepage at the /home route.
  5. Given that I am a user that just signed up
    • When I refresh the homepage at the /home route
    • Then I will still be logged in

Demo User

As a first-time user who just wants to demo Code Hunt, I want to be able to try out the site with a demo user login via a single button click on the login and signup form, so that I can access Code Hunt without having to go through the trouble of creating a new account.

Questions

  • What will happen when I click on the demo user button?
  • What will the demo user see when they log in?

Acceptance Criteria

  1. Given that I'm not logged in
    • When I click the Demo link
    • Then I will be rerouted to the /home path

Logout

As a logged-in user, I want to logout via a button on the navigation bar, so that I can hide my account information to the rest of the users on this device.

Questions

  • How will a user be able to log out?
  • Where should the user be redirected after successfully logging out?
  • What will happen to the user's session when he/she successfully logs out?
  • What if the user hits the backspace button after successfully logging out?

Acceptance Criteria

  1. Given that I'm a logged in user
    • When When I'm on the /home or /profile route
    • Then Then there will be a navigation bar at the top that will include a log out button for the user to click
  2. Given Given that I'm a user that has recently logged out
    • When I try to click the back button to go to the previous page (/home or /profile route)
    • Then Then I will be redirected to the / route, as my session expired when I logged out

User Home Page

As a logged-in user, I want to be able to see all the links, so that I can browse through them on Code Hunt.

Questions

  • How do I see all the links?
  • How do navigate to a link?
  • How will the links be organized?
  • What if I want to add a post?

Acceptance Criteria

User Profile Page

As a logged-in user, I want to be able to see all the chirps that I created, so that I can browse through all my thoughts I shared with the other users on Code Hunt.

As a logged-in user, I want to be able to see all the chirps for a single user other than myself, so that I can browse through all the thoughts for the user that I'm interested in knowing more about at the moment.

...Questions and Acceptance Criteria

Clone this wiki locally