From 7d55bbea4b0e2b853d4e508a0354fa65acaf61e0 Mon Sep 17 00:00:00 2001 From: Quat3rnion Date: Mon, 3 Jun 2024 23:53:15 -0400 Subject: [PATCH] Use Snowflake in Claims --- src/types/utils/jwt.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/utils/jwt.rs b/src/types/utils/jwt.rs index 6addb4c..0919a5a 100644 --- a/src/types/utils/jwt.rs +++ b/src/types/utils/jwt.rs @@ -19,7 +19,7 @@ pub struct Claims { /// When the token was issued pub iat: i64, pub email: String, - pub id: String, + pub id: Snowflake, } impl Claims { @@ -27,7 +27,7 @@ impl Claims { let unix = chrono::Utc::now().timestamp(); Self { exp: unix + (60 * 60 * 24), - id: id.to_string(), + id: *id, iat: unix, email: user.to_string(), }