First draft of token refresh
This commit is contained in:
parent
badf68e579
commit
7dffbb9597
5 changed files with 64 additions and 4 deletions
|
|
@ -15,7 +15,7 @@ CREATE TABLE refresh_tokens (
|
|||
-- This is more efficient than storing the text
|
||||
token bytea PRIMARY KEY,
|
||||
-- The user for whom the token was created
|
||||
user_id uuid NOT NULL REFERENCES users(id),
|
||||
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
||||
-- When the token expires
|
||||
expires_at timestamp NOT NULL,
|
||||
-- When the token was last used (is NULL until used)
|
||||
|
|
|
|||
Reference in a new issue