Skip to content

Commit 901cc1f

Browse files
authored
docs: add wildcard redirect URI documentation (#1339)
Document the new wildcard pattern support in redirect URIs introduced in logto-io/logto#8094. Include usage rules, examples, and security caution about increased attack surface.
1 parent 608a0f5 commit 901cc1f

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

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

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,28 @@ You can check out the [Redirection endpoint](https://datatracker.ietf.org/doc/ht
6767
Understanding Redirect URIs in OIDC with Authorization Code Flow
6868
</Url>
6969

70+
#### Wildcard patterns \{#wildcard-patterns}
71+
72+
_Availability: Single page app, Traditional web app_
73+
74+
Redirect URIs support wildcard patterns (`*`) for dynamic environments such as preview deployments. Wildcards can be used in the hostname and pathname components of HTTP/HTTPS URIs.
75+
76+
**Rules:**
77+
78+
- Wildcards are only permitted in the hostname and pathname
79+
- Wildcards are not allowed in the scheme, port, query parameters, or hash fragments
80+
- Hostname wildcards must include at least one dot (e.g., `https://*.example.com/callback`)
81+
82+
**Examples:**
83+
84+
- `https://*.example.com/callback` - matches any subdomain
85+
- `https://preview-*.example.com/callback` - matches preview deployments
86+
- `https://example.com/*/callback` - matches any path segment
87+
88+
:::caution
89+
Wildcard redirect URIs are not standard OIDC and can increase the attack surface. Use with care and prefer exact redirect URIs whenever possible.
90+
:::
91+
7092
### Post sign-out redirect URIs \{#post-sign-out-redirect-uris}
7193

7294
_Post sign-out redirect URIs_ are a list of valid URIs that have been pre-configured for an application to redirect the user after they have signed out from Logto.

0 commit comments

Comments
 (0)