Refresh Tokens

This commit is contained in:
2025-03-11 22:39:58 +02:00
parent 5fe09f0a2f
commit 1bad21ae45
13 changed files with 254 additions and 15 deletions

View File

@@ -0,0 +1,12 @@
-- +goose Up
CREATE TABLE refresh_tokens(
token TEXT PRIMARY KEY,
created_at TIMESTAMP not null DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP not null DEFAULT CURRENT_TIMESTAMP,
user_id UUID not null REFERENCES users(id) ON DELETE CASCADE,
expires_at timestamp not null,
revoked_at timestamp default null
);
-- +goose Down
DROP TABLE refresh_tokens;