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
View File
@@ -3,7 +3,6 @@ use uuid::Uuid;
pub struct TokenRow {
pub id: Uuid,
pub app_id: Uuid,
pub access_token_hash: Vec<u8>,
pub refresh_token_hash: Vec<u8>,
pub access_expires_at: DateTime<Utc>,
+2 -3
View File
@@ -9,13 +9,12 @@ where
sqlx::query!(
r#"
INSERT INTO tokens (
id, app_id, access_token_hash, refresh_token_hash,
id, access_token_hash, refresh_token_hash,
access_expires_at, refresh_expires_at, revoked_at, created_at
)
VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
VALUES ($1, $2, $3, $4, $5, $6, $7)
"#,
token.id,
token.app_id,
token.access_token_hash,
token.refresh_token_hash,
token.access_expires_at,