From e1b9d9718e066f7c64c8559dd73e6f9eb93ff944 Mon Sep 17 00:00:00 2001 From: Hayden Hargreaves Date: Tue, 10 Jun 2025 21:46:27 -0700 Subject: [PATCH] (DOCS): Began specifications for user authentication. This includes API and UI specs. The next step is actually beginning to write some API code. --- spec/TechnicalSpecification.md | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/spec/TechnicalSpecification.md b/spec/TechnicalSpecification.md index fa6331e..ae90a5e 100644 --- a/spec/TechnicalSpecification.md +++ b/spec/TechnicalSpecification.md @@ -213,6 +213,58 @@ creation process will take place here + +## Authentication + +This section outlines the authentication requirements for the application. This section +is **not** broken down by page, they are simple defined. + +#### Pages + +- [ ] **Register Page** + - [ ] Input form with required details: *name, email and password* + - [ ] *Password strength meter** + - [ ] User should be directed to the home page when account is created + - [ ] User will be logged in + - [ ] A notification will be provided to the user indicating success and redirection + - [ ] User should see error messages when validation issues occur + - [ ] Email already in use + - [ ] Passwords do not match + - [ ] Server failure (this should never happen) + +- [ ] **Sign In Page** + - [ ] Input form with required details: *email, password and forgot password button* + - [ ] User should be directed to the home page after signing in + - [ ] A notification will be provided to the user indicating success and redirection + - [ ] User should see error messages when validation issues occur + - [ ] Invalid password + - [ ] Server failure (this should never happen) + +'*': Future ideas + + +#### API Requirements + +- [ ] **Register Page** + - [ ] Create a new user in the database + - [ ] Password should be stored in the database as a hash + - [ ] Ensure that emails are not duplicated + - [ ] "Log user in" when account is created + - [ ] User should be redirected to the home page on success + +- [ ] **Sign In Page** + - [ ] Sign user in and return data to be stored in the session + - [ ] Validate password to the hash stored in the DB + - [ ] User should be redirected to the home page on success + +- [ ] **Session Management** + - [ ] *Uses cookies to store required data** + +'*': Unsure on technical implementation + + + + ## Database Requirements This section outlines the specific technical requirements for the database store for