From 0db744bd2f70fd63bd23a3763db4221cdc79c4a0 Mon Sep 17 00:00:00 2001 From: kittygaming99 <54167086+kittygaming99@users.noreply.github.com> Date: Fri, 7 Aug 2026 12:27:32 +1000 Subject: [PATCH] Simplify claim extraction logic Removed redundant extraction of 'name' claim from user info. The admin may wish to fall back to preferred_username, even if name exists --- src/sso.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/sso.rs b/src/sso.rs index 6e0bbd5e..9f9a8ab5 100644 --- a/src/sso.rs +++ b/src/sso.rs @@ -299,8 +299,6 @@ pub async fn exchange_code( let user_name = extract_claim(&id_claims_json, &configured_claim) .or_else(|| extract_claim(&user_info_json, &configured_claim)) - .or_else(|| extract_claim(&id_claims_json, "name")) - .or_else(|| extract_claim(&user_info_json, "name")) .or_else(|| id_claims.preferred_username().map(|n| n.to_string())) .or_else(|| user_info.preferred_username().map(|n| n.to_string()));