Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

[FEATURE] Use OIDC standard user claim member "locale" within the SSO flow and to set the user's default language #11709

Open
menturion opened this issue Jan 9, 2022 · 4 comments
Labels
P5 (OBSOLETE: use S- labels.) Dubious backlog: will not schedule, but may consider patches T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.

Comments

@menturion
Copy link

menturion commented Jan 9, 2022

Use OIDC standard user claim member locale ( [ISO639‑1] language code, e.g. en-EN; see https://openid.net/specs/openid-connect-core-1_0.html#UserInfo) ...

  1. to choose the user's language within the SSO flow (affected template: synapse/res/templates/sso_redirect_confirm.html) and
  2. to set the user's default language for matrix clients (e.g. Element Web).

Currently, ...

  1. the SSO redirect template uses en-EN only and
  2. the language is chosen on the basis of the browser language.
@clokep
Copy link
Contributor

clokep commented Jan 10, 2022

See also #9386.

@menturion
Copy link
Author

See also #9386.

The feature request filed here #9386 requests the support of multi-languages for the SSO flow.

The feature request filed here, however, suggests to use the OIDC claim member "locale" for two purposes:

  1. to select the language based on the user claim "locale" for the SSO flow as the user currently uses for the IdP so that we have a consistent language along the flow and
  2. to set the users's default language for synapse resp. the client also based on the given OIDC claim member "locale".

@callahad callahad added T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements. P5 (OBSOLETE: use S- labels.) Dubious backlog: will not schedule, but may consider patches and removed X-Needs-Discussion labels Jan 13, 2022
@callahad
Copy link
Contributor

This sounds like a behavior we'd want to support (maintaining a consistent language as you bounce from Synapse to the IdP and back), but actually implementing this in a way that is usable and robust is a bit of a daunting challenge.

Are system / browser Accept-Language settings insufficient?

@menturion
Copy link
Author

Are system / browser Accept-Language settings insufficient?

It is at least sub-optimal with respect to the UX. The "locale" user claim is the best hint to what language the user wants to use for the OIDC client which can differ from the system / browser Accept-Language setting. Thus, just using the system / browser Accept-Language setting will not ensure a consistent language.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P5 (OBSOLETE: use S- labels.) Dubious backlog: will not schedule, but may consider patches T-Enhancement New features, changes in functionality, improvements in performance, or user-facing enhancements.
Projects
None yet
Development

No branches or pull requests

4 participants