-
-
Notifications
You must be signed in to change notification settings - Fork 676
feat: support wildcard patterns in redirect URIs #8094
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Arochka
wants to merge
12
commits into
logto-io:master
Choose a base branch
from
Arochka:feat/wildcard-redirect-uris
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+724
−48
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMPARE TO
|
| Name | Diff |
|---|---|
| .changeset/wild-cats-march.md | 📈 +550 Bytes |
| package.json | 📈 +54 Bytes |
| packages/console/src/mdx-components/UriInputField/index.tsx | 📈 +155 Bytes |
| packages/console/src/pages/ApplicationDetails/ApplicationDetailsContent/Settings.tsx | 📈 +1.16 KB |
| packages/console/src/utils/validator.ts | 📈 +2.79 KB |
| packages/core/src/oidc/utils.test.ts | 📈 +2.72 KB |
| packages/core/src/oidc/utils.ts | 📈 +2.78 KB |
| packages/phrases/src/locales/en/translation/admin-console/application-details.ts | 📈 +186 Bytes |
| packages/phrases/src/locales/fr/translation/admin-console/application-details.ts | 📈 +231 Bytes |
| packages/schemas/src/foundations/jsonb-types/oidc-module.ts | 📈 +62 Bytes |
| packages/toolkit/core-kit/src/utils/url.test.ts | 📈 +787 Bytes |
| packages/toolkit/core-kit/src/utils/url.ts | 📈 +3.05 KB |
| patches/oidc-provider.patch | 📈 +6.14 KB |
| pnpm-lock.yaml | 📈 +962 Bytes |
16f9a25 to
b25868a
Compare
wangsijie
reviewed
Dec 19, 2025
Contributor
wangsijie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since wildcard redirect URIs are not standard OIDC and expand the attack surface, could we add either a warning banner in the admin console when wildcards are used, or an environment variable to explicitly opt-in to this feature?
b25868a to
2c3384d
Compare
2c3384d to
50e6847
Compare
- Limit wildcard redirect URIs to non-native apps (SPA/Traditional only) - Add dot segment validation to prevent path traversal in console validator - Reorder scheme validation logic for better code flow - Add comprehensive test cases for wildcard origin matching edge cases
- Optimize regex character class order per unicorn/better-regex - Fix multi-line return formatting per prettier
- Optimize regex character class order for unicorn/better-regex - Wrap escapeRegExp in arrow function for unicorn/no-array-callback-reference
The upstream commit 1107094 has ESM issues that break Jest tests. Reverting to the original approach using patch file with the working base commit aa47a2b.
7278ce3 to
fc27099
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for wildcard patterns (*) in redirect URIs to better support dynamic environments (e.g. preview deployments).
Rules (web only):
Implementation details:
Testing
- packages/toolkit/core-kit/src/utils/url.test.ts (wildcard redirect URL validation)
- packages/core/src/oidc/utils.test.ts (origin matching with wildcard redirect URIs)
Tested locally.
Checklist
.changeset