Skip to content

hon-nova/COM3013_W2025_Term_Project

Repository files navigation

Key Notes:

  1. Create Session

    a. Once a user logs in successfully, a session with a 2-day lifespan is created

    b. If a user logs out manually (by using the SignOut button), their session will be removed. Once they log in again, a new session will be created. If they do not log out, their session remains active and valid until it reaches its expiration

  2. Applying Better Auth for Both Regiser & Login. (Better Auth using common stateless authentication.)

    Register
    1. The zod library is used to sanitize user inputs.
    2. The scrypt library (the same as Better Auth's) is used to hash the user input password when saving the user into the database.
    Login
    1. Use Better Auth SSR authentication.