feat: implement user authentication with login endpoint and cookie management

This commit is contained in:
2026-04-13 17:25:34 +08:00
parent 75abbb0a2a
commit 8fbb73740c
15 changed files with 275 additions and 5 deletions
+5 -3
View File
@@ -1,12 +1,14 @@
DROP TABLE IF EXISTS app_user;
DROP TABLE IF EXISTS app_user CASCADE;
CREATE TABLE app_user
(
id BIGSERIAL NOT NULL PRIMARY KEY,
username VARCHAR(255) NOT NULL,
email VARCHAR(255) NOT NULL
email VARCHAR(255) NOT NULL,
CONSTRAINT app_user_username_key UNIQUE (username),
CONSTRAINT app_user_email_key UNIQUE (email)
);
DROP TABLE IF EXISTS app_user_credential;
DROP TABLE IF EXISTS app_user_credential CASCADE;
CREATE TABLE app_user_credential
(
user_id BIGINT NOT NULL REFERENCES app_user (id),