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
+2 -2
View File
@@ -559,7 +559,7 @@ pub async fn update_profile(
let updated = auth_service
.auth_application_service
.update_profile_with_perms(user_id, dto)
.update_profile_with_perms(user_id, dto, &state.locale_registry)
.await?;
Ok((StatusCode::OK, Json(updated)))
@@ -926,7 +926,7 @@ pub async fn oidc_callback(
// Exchange code, validate state/nonce/PKCE, authenticate user
let result = auth_app
.oidc_callback(&query.code, &query.state)
.oidc_callback(&query.code, &query.state, &state.locale_registry)
.await
.map_err(|e| {
tracing::error!("OIDC callback failed: {}", e);