From c0b6c9c0f31c20e73217f431f1403a732499d46f Mon Sep 17 00:00:00 2001 From: bain Date: Sat, 1 Jun 2024 23:44:17 +0200 Subject: [PATCH] fix token claims creation --- src/accounts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/accounts.rs b/src/accounts.rs index 1c66307..5637d77 100644 --- a/src/accounts.rs +++ b/src/accounts.rs @@ -136,7 +136,7 @@ pub fn create_id_token_claims( let choose = |what: &str, from: &[&'static str]| { let tag = hmac::sign(&mangler, (what.to_owned() + client_id).as_bytes()); let mut bytes: [u8; 4] = [0; 4]; - bytes.copy_from_slice(tag.as_ref()); + bytes.copy_from_slice(&tag.as_ref()[..4]); from[i32::from_le_bytes(bytes) as usize % from.len()] };