(DOCS): Going to need a session table and such for user management.

This is the final piece that is needed for user management, the
sessions. Both in the repository as well as the session/middleware.
This commit is contained in:
Hayden Hargreaves 2025-06-13 23:01:54 -07:00
parent a9cdc25adf
commit 86913faed7

View File

@ -213,61 +213,6 @@ 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.
Consider looking into using Google OAuth. Appears to be free and can be implemented pretty easily.
Reference [here](https://developers.google.com/identity/protocols/oauth2).
#### 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
@ -310,9 +255,18 @@ found in **OTHER** section.
- [ ] User: Represents a single user.
- [ ] ID (PK) BigSerial
- [ ] GoogleId (Unique, Required) text
- [ ] Name (Required) string(64)
- [ ] Email (Unique, Required) string(128)
- [ ] Password (Required) string(128) *stored as hash***
- [ ] ImageURL () text
- [ ] GoogleToken () text
- [ ] Created (Required) date/time stamp
- [ ] Session: Represents a single user-session.
- [ ] ID (PK) BigSerial
- [ ] UserId (FK: User.Id, Required) BigSerial
- [ ] Token (Required) text
- [ ] Expiration (Required) date/time stamp
- [ ] Created (Required) date/time stamp
- [ ] Engagement: Represents a single engagement from a single user.