Do not tie tokens to a user app.

This commit is contained in:
Rogier Reerink
2026-10-08 15:09:06 +02:00
parent d12fe3af7d
commit 15b229b0de
8 changed files with 24 additions and 31 deletions
@@ -1,6 +1,5 @@
CREATE TABLE tokens (
id UUID PRIMARY KEY DEFAULT gen_random_uuid (),
app_id UUID NOT NULL CONSTRAINT fk_tokens_app REFERENCES user_apps (id) ON DELETE CASCADE,
access_token_hash BYTEA NOT NULL UNIQUE CHECK (
octet_length(access_token_hash) = 32
),