Skip to content

Commit ead3023

Browse files
Rany0101Copilot
andauthored
chore: update doc details from feedbacks (#1286)
* chore: update doc details from feedback * chore: update docs/user-management/user-data.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore: update docs/end-user-flows/authentication-parameters/first-screen.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 7d08c7f commit ead3023

File tree

15 files changed

+144
-10
lines changed

15 files changed

+144
-10
lines changed

docs/authorization/global-api-resources.mdx

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,36 @@ Use a [personal access token](/user-management/personal-access-token) to simulat
245245

246246
</details>
247247

248+
<details>
249+
<summary>
250+
251+
### Can I use scope prefixes or shortened versions when requesting permissions? \{#can-i-use-scope-prefixes-or-shortened-versions}
252+
253+
</summary>
254+
255+
No. Scope names must **exactly match** the permission names defined in your API resource. Prefixes and shortened versions do not work as wildcards.
256+
257+
**Example:**
258+
259+
If your API resource defines:
260+
261+
- `read:elections`
262+
- `write:elections`
263+
264+
You must request:
265+
266+
```swift
267+
scopes: ["read:elections", "write:elections"]
268+
```
269+
270+
This will **NOT work**:
271+
272+
```swift
273+
scopes: ["read", "write"] // ❌ Doesn't match permission names
274+
```
275+
276+
</details>
277+
248278
## Further reading \{#further-reading}
249279

250280
<Url href="/authorization/validate-access-tokens">How to validate access tokens</Url>

docs/customization/localized-languages.mdx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,19 @@ Suppose, that you only want to make adjustments to a subset of the original cont
9999

100100
</details>
101101

102+
<details>
103+
<summary>
104+
105+
### How can I set a default phone number country code for the sign-in experience? \{#how-can-i-set-a-default-phone-number-country-code-for-the-sign-in-experience}
106+
107+
</summary>
108+
109+
The phone number country code in the [sign-in experience](/end-user-flows/sign-up-and-sign-in/sign-up) defaults to the user's browser locale. For example, if a user's browser language is set to `fr`, the country code will default to France (+33).
110+
111+
To programmatically control the default country code for specific users or regions, you can use the [`ui_locales`](/end-user-flows/authentication-parameters/ui-locales) authentication parameter. For instance, setting `ui_locales=ja` will default the country code to Japan (+81).
112+
113+
</details>
114+
102115
## Related resources \{#related-resources}
103116

104117
<Url href="https://blog.logto.io/rtl-language-support">

docs/end-user-flows/account-settings/by-account-api.mdx

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,17 @@ curl -X PATCH https://[tenant-id].logto.app/api/account-center \
353353
--data-raw '{"webauthnRelatedOrigins":["https://account.example.com"]}'
354354
```
355355

356-
To learn more about the related origins, please refer to [Related Origin Requests](https://passkeys.dev/docs/advanced/related-origins/) documentation.
356+
:::note
357+
358+
WebAuthn supports up to 5 unique eTLD+1 labels for Related Origins. The eTLD+1 (effective top-level domain plus one label) is the registrable domain portion. For example:
359+
360+
- `https://example.com`, `https://app.example.com`, and `https://auth.example.com` count as **one** label (`example.com`)
361+
- `https://shopping.com`, `https://shopping.co.uk`, and `https://shopping.co.jp` also count as **one** label (`shopping`)
362+
- `https://example.com` and `https://another.com` count as **two** labels
363+
364+
If you need to support more than 5 different domains as the Related Origins, refer to the [Related Origin Requests](https://passkeys.dev/docs/advanced/related-origins/) documentation for details.
365+
366+
:::
357367

358368
**Step 2: Request new registration options**
359369

docs/end-user-flows/authentication-parameters/first-screen.mdx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ A set to custom authentication parameters that allow you to tailor the desired f
1414

1515
The `first_screen` parameter is the key parameter that determines the first screen that the users will see when they redirect to the Logto's sign-in page. By default, the universal sign-in form will be displayed. Use this parameter to customize the first screen based on your application's requirements. Supported values are:
1616

17-
- `sign_in`: Displays the sign-in form. (Default)
17+
- `sign_in` (Default): Displays the sign-in form.
1818
- `register`: Displays the sign-up form.
1919
- `reset_password`: Displays the password reset form.
2020
- `single_sign_on`: Displays the enterprise SSO sign-in form. (A email address will be asked to determine the enabled SSO providers)
21-
- `identifier:sign-in`: Displays a identifier specific sign-in form. The identifier type can be specified using the `identifier` parameter. This is useful when you have multiple identifier sign-in methods enabled.
22-
- `identifier:register`: Displays a identifier specific sign-up form. The identifier type can be specified using the `identifier` parameter. This is useful when you have multiple identifier sign-up methods enabled.
21+
- `identifier:sign-in`: Displays a identifier specific sign-in form. The identifier type can be specified using the `identifier` parameter (optional). This is useful when you have multiple identifier sign-in methods enabled.
22+
- `identifier:register`: Displays a identifier specific sign-up form. The identifier type can be specified using the `identifier` parameter (optional). This is useful when you have multiple identifier sign-up methods enabled.
2323

2424
<img src="/img/assets/first-screen-parameter.png" alt="First screen parameter" />
2525

@@ -30,6 +30,10 @@ curl --location \
3030
--request GET 'https://<your-tenant>.logto.app/oidc/auth?client_id=<client_id>&...&first_screen=single_sign_on'
3131
```
3232

33+
:::tip
34+
The first screen will follow the settings configured in <CloudLink to="/sign-in-experience/branding">Console > Sign-in experience</CloudLink>. You need to enable the required authentication methods first, and configure branding, terms and privacy policies, and internationalization (i18n). Note that only the `sign-in` and `register` pages display the logo by default.
35+
:::
36+
3337
## identifier \{#identifier}
3438

3539
The `identifier` parameter is used to specify the identifier types that the sign-in or sign-up form will take. This parameter is only applicable when the `first_screen` parameter is set to `identifier:sign-in`, `identifier:register`, or `reset_password`. Supported values are: `username`, `email`, and `phone`. Separate multiple values with a empty space to allow multiple identifier types.

docs/end-user-flows/authentication-parameters/ui-locales.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Logto supports the standard OIDC authentication parameter `ui_locales` to contro
1111
- 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.
1212
- Affects email localization for messages triggered by the interaction (e.g., verification code emails). See [Email template localization](/connectors/email-connectors/email-templates#email-template-localization).
1313
- Exposes the original value to email templates as a variable `uiLocales`, allowing you to include it in the email subject/content if needed.
14+
- Sets the default phone number country code in the sign-in experience. For example, if `ui_locales=fr`, the phone number input field will default to France (+33). This is useful when you want to control the default country code programmatically for specific user groups or regions.
1415

1516
## Parameter format \{#parameter-format}
1617

docs/end-user-flows/sign-up-and-sign-in/sign-in.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ If both factors are enabled, users can choose either method to complete the sign
3636
The sign-in experience adapts based on the chosen identifier and available authentication factors.
3737

3838
- **Smart input for multiple identifiers:**
39-
If more than one identifier sign-in method is enabled, Logto build-in sign-in page will automatically detect the type of identifier entered by the user and display the corresponding verification options. For example, if both **Email address** and **Phone number** are enabled, the sign-in page will automatically detect the type of identifier entered by the user and display the corresponding verification options. It switches to a phone number format with region code if numbers are entered consecutively or an email format when a “@” symbol is used.
39+
If more than one identifier sign-in method is enabled, Logto build-in sign-in page will automatically detect the type of identifier entered by the user and display the corresponding verification options. For example, if both **Email address** and **Phone number** are enabled, the sign-in page will automatically detect the type of identifier entered by the user and display the corresponding verification options. It switches to a phone number format with region code if numbers are entered consecutively or an email format when a "@" symbol is used.
40+
- The phone number country code defaults to the user's browser locale; users can switch manually. You can use the [`ui_locales`](/end-user-flows/authentication-parameters/ui-locales) parameter to set a specific default country code. See [Localized languages](/customization/localized-languages#how-can-i-set-a-default-phone-number-country-code-for-the-sign-in-experience) for more details.
4041
- **Enabled verification factors:**
4142
- **Password only:** Both identifier and password fields will be displayed on the first screen.
4243
- **Verification code only:** The identifier field appears on the first screen, followed by the verification code field on the second screen.

docs/end-user-flows/sign-up-and-sign-in/sign-up.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,16 @@ If no identifiers are selected, it applies to the [social](/end-user-flows/sign-
2525

2626
You can adjust the order of sign-up identifiers to prioritize the one you want users to provide first during sign-up. This order is reflected in the sign-up process, where the first identifier appears on the initial registration screen, and the rest are collected in subsequent steps.
2727

28+
:::tip
29+
To block specific types of email addresses during sign-up (such as disposable emails, subaddressing with plus signs (+), specific email addresses, or entire domains), use the **blocklist** feature in the Security section. See [Blocklist](/security/blocklist) for more details.
30+
:::
31+
32+
:::tip
33+
The phone number **country code** defaults to the user's browser locale. For example, if a user's browser language is set to `fr`, the country code will default to France (+33).
34+
35+
You can also use the [`ui_locales`](/end-user-flows/authentication-parameters/ui-locales) authentication parameter to set the sign-in experience language, which will also determine the default country code.
36+
:::
37+
2838
## Set up the sign-up verification settings \{#set-up-the-sign-up-verification-settings}
2939

3040
To ensure the security of the user sign-up and future sign-in process, you also need to configure the verification settings for the identifiers that you collect during the sign-up process. The available settings are:

docs/integrate-logto/application-data-structure.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ An _Application_ can be one of the following application types:
3333

3434
_Application secret_ is a key used to authenticate the application in the authentication system, specifically for private clients (Traditional Web and M2M apps) as a private security barrier.
3535

36+
:::tip
37+
Single Page Apps (SPAs) and Native apps don't provide App secret. SPAs and Native apps are "public clients" and cannot keep secrets (browser code or app bundles are inspectable). Instead of an app secret, Logto protects them with PKCE, strict redirect URI/CORS validation, short-lived access tokens, and refresh-token rotation.
38+
:::
39+
3640
### Application name \{#application-name}
3741

3842
_Application name_ is a human-readable name of the application and will be displayed in the admin console.

docs/integrate-logto/integrate-logto-into-your-application/README.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ The guide in the console is only for quick start with Logto using our SDK. For c
2525
<Url href="/authorization">Authorization</Url>
2626
<Url href="/organizations">Organizations</Url>
2727

28+
## FAQs
29+
30+
<details>
31+
<summary>
32+
### How can my backend service validate user tokens and manage users with Logto?
33+
</summary>
34+
To securely validate access tokens in your backend API (e.g., Python, Node.js, Go, Java, PHP, etc.), and to programmatically manage users, please refer to the guide: [How to validate access tokens in your API service or backend](/authorization/validate-access-tokens).
35+
36+
This documentation covers:
37+
38+
- How to check the validity of bearer tokens in every API call
39+
- Best practices for integrating Logto with multiple frontend apps and a backend service
40+
41+
</details>
42+
2843
## Related resources \{#related-resources}
2944

3045
<Url href="https://blog.logto.io/complete-guide-to-integrating-oidc-server">

docs/integrate-logto/third-party-applications/README.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Thus due to OIDC builds upon [OAuth 2.0](https://auth.wiki/oauth-2.0) adding an
2222

2323
## Create an third-party application in Logto \{#create-an-third-party-application-in-logto}
2424

25-
1. Go to <CloudLink to="/applications">Console > Applications</CloudLink>
26-
2. Select "Third-party app" as the application type and choose one of the following integration protocols:
25+
1. Go to <CloudLink to="/applications">Console > Applications</CloudLink>.
26+
2. Click on the "Create application" button. Select "Third-party app" as the application type and choose one of the following integration protocols:
2727
- OIDC / OAuth
2828
3. Enter a name and description for your application and click on the “Create” button. A new third-party application will be created.
2929

0 commit comments

Comments
 (0)