feat(user.prefered_locale): save user's locale + invited have same locale as inviters

- OIDC JIT define the locale only at user creation, user can so change his preference later
    - invited users will inherit inviter's locale
    - email will use prefered_locale
    - login to a new browser will use prefered_locale
This commit is contained in:
Edouard Vanbelle
2026-06-03 14:26:45 +02:00
parent 854f1d3a07
commit 7db27af7a6
14 changed files with 342 additions and 26 deletions
+6
View File
@@ -173,6 +173,12 @@ pub struct OidcIdClaims {
pub family_name: Option<String>,
pub groups: Vec<String>,
pub picture: Option<String>,
/// Standard OpenID claim `locale` (BCP-47 language tag, e.g.
/// `"fr"`, `"zh-TW"`). Populated on the new `User` row at OIDC JIT
/// provisioning if the claim resolves against the server's
/// `LocaleRegistry`; ignored on subsequent logins so a later
/// UI-driven choice isn't overwritten by the IdP.
pub locale: Option<String>,
}
/// Port for OIDC operations — implemented in infrastructure layer