Skip to content

Commit ad4f9d6

Browse files
authored
chore: add changeset for ui_locales feature (#7825)
1 parent 718a142 commit ad4f9d6

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
"@logto/core": minor
3+
"@logto/experience": minor
4+
"@logto/schemas": minor
5+
"@logto/connector-kit": minor
6+
---
7+
8+
add support to the OIDC standard authentication parameter `ui_locales`
9+
10+
We are now supporting the standard OIDC `ui_locales` auth parameter to customize the language of the authentication pages. You can pass the `ui_locales` parameter in the `signIn` method via the `extraParams` option in all Logto SDKs.
11+
12+
### What it does
13+
14+
- Determines the UI language of the Logto-hosted sign-in experience at runtime. Logto picks the first language tag in `ui_locales` that is supported in your tenant's language library.
15+
- Affects email localization for messages triggered by the interaction (e.g., verification code emails).
16+
- Exposes the original value to email templates as a variable `uiLocales`, allowing you to include it in the email subject/content if needed.
17+
18+
### Example
19+
20+
If you want to display the sign-in page in French (Canada), you can do it like this:
21+
22+
```ts
23+
await logtoClient.signIn({
24+
redirectUri: 'https://your.app/callback',
25+
extraParams: {
26+
ui_locales: 'fr-CA fr en',
27+
},
28+
});
29+
```
30+
31+
Refer to the [documentation](https://docs.logto.io/end-user-flows/authentication-parameters/ui-locales) for more details.

0 commit comments

Comments
 (0)