Implement token refresh for websockets

This commit is contained in:
Zoe Roux
2026-05-04 11:21:00 +02:00
parent 2cd92c4665
commit e692fda620
11 changed files with 169 additions and 10 deletions
+13
View File
@@ -44,6 +44,19 @@ where s.user_pk = u.pk
returning
s.*;
-- name: GetUserFromSessionId :one
select
s.pk,
s.id,
s.last_used,
sqlc.embed(u)
from
keibi.users as u
inner join keibi.sessions as s on u.pk = s.user_pk
where
s.id = $1
limit 1;
-- name: ClearOtherSessions :exec
delete from keibi.sessions as s using keibi.users as u
where s.user_pk = u.pk