Login Security using Storage
This assignment uses storage to ensure proper authentication
of a user. (This does not use forms)
Create 3 pages with the following functionality:
- Login Page
- Contents
- External Header
- External Footer
- External CSS with styles applied
- External JS
- Name label text with Name input field
- Password label text with password field
- Generic container for error messages - with red text
- Submit Button
- Functionality
- When page is loaded, check for previous valid authentication. If true, go to Index Page, if False, stay on login page.
- User can enter name and password (no input validation needed)
- Upon hitting submit, users values are validated against a username and pass stored as constants in your JS file
- If Username/Pass are wrong, show error message in the error / generic container
- If the user tries to log in 3 times incorrectly, take user to Error Page
- If the user comes to the login page and they have already tried 3 times, they should be redirected to the error page.
- If Username/Pass are correct, move user to Index Page
- The functionality of this page should be achieved using session storage.
- Index (or landing) Page
- Contents
- External Header
- External Footer
- External CSS with styles applied
- External JS
- A header with a generic title of your choice
- A welcome message that welcomes the user by the username/name input on the login page
- Functionality
- If user is authenticated properly, user is allowed to see page
- If user is not authenticated properly or has skipped the login page, user should be taken to the Login Page
with a message in the error generic container stating "You must login first to see that page."
- Unauthorized (or error) Page
- Contents
- External Header
- External Footer
- External CSS with styles applied
- External JS (if needed)
- A header indicating an authentication error
- A container with the message "You have tried to log in too many times. Please try again later"
- Functionality
- This page should reset your bad login attempt counter to zero.