Files
zxq5.dev/backend/sql/functions/auth.surql
T
FantasyPvP 1707309d95 data
2024-12-02 17:39:27 +00:00

13 lines
280 B
Plaintext

DEFINE FUNCTION auth::sessiontoken::new($user: uuid) {
LET $token = rand::string(64);
CREATE SessionToken CONTENT {
id: rand::uuid::v4(),
created: time::now(),
expires: time::now() + 7d,
token: $token,
user: Entity:user,
};
}