Add password reset service

This commit is contained in:
2024-09-12 07:33:10 -04:00
parent 56ce9fa2f8
commit 32f10ce40c
11 changed files with 539 additions and 38 deletions

View File

@@ -0,0 +1,14 @@
-- +goose Up
-- +goose StatementBegin
CREATE TABLE password_resets (
id SERIAL PRIMARY KEY,
user_id INT UNIQUE REFERENCES users (id) ON DELETE CASCADE,
token_hash TEXT UNIQUE NOT NULL,
expires_at TIMESTAMPTZ NOT NULL
);
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
DROP TABLE password_resets;
-- +goose StatementEnd