User Stories - nhucleus/stumblr-app GitHub Wiki
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 or username with a secured password
- What routes should we use for login?
- User will login via
/login
route
- User will login via
- Where should the user be redirected after login?
- User will be redirected to a page displaying all blog posts published by bloggers that they follow
- What happens if the user doesn't exist yet?
- Display an error message
Invalid Login. Please try again.
- Display an error message
- What happens if the user enters the wrong password?
- Display an error message
Invalid Login. Please try again.
- Display an error message
- What happens if the user with the username or email already exists?
- The user will not be able to create a new account without a unique email or username
- Display an error message
User with email and/or username already exists.
- 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
- Given that I'm a logged-out user and
- When I'm on the
/login
route - Then there will be a login form with an email and password field and a "Login" button to submit the form.
- When I'm on the
- 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.
- Then at the top of the form, I will see a red message,
- 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.
- Then at the top of the form, I will see a red message,
- 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 previous page they were on
- Given that I am a logged-in user
- When I refresh the homepage at the
/
route - Then I will still be logged in
- When I refresh the homepage at the
- Given that I am a logged-out user
- I'm unable to publish blog posts, reblog other postings, or edit my blog posts.
Sign Up
As an unauthorized user, I want to be able to sign up for the website via a signup form, so that I can access Kawaii.
Acceptance Criteria
- 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, and password field and a "Sign Up" button to submit the form.
- When I'm on the
- 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.
- When I try to fill out the form with a password shorter than 8 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 8 characters long.
- 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
/
route.
- Then I will be redirected to the homepage at the
- Given that I am a user that just signed up
- When I refresh the homepage at the
/
route - Then I will still be logged in
- When I refresh the homepage at the
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.
Publish Blog Posts
As a logged-in user, I want to publish blog posts, so that I can allow others to view my creation or share my interests with others alike.