-
Notifications
You must be signed in to change notification settings - Fork 30
Update wildcards-for-subdomains.mdx #371
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
nick-gagliardi
wants to merge
2
commits into
main
Choose a base branch
from
MCD-placeholders
base: main
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.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,7 @@ You can use various placeholders to act as dynamic text entries in your URLs. | |
|
|
||
| ## How URL evaluation works | ||
|
|
||
| A URL containing an `{organization_name}` placeholder will only be evaluated when all the following the conditions are met: | ||
| A URL containing an `{organization_name}` placeholder will only be evaluated when all the following conditions are met: | ||
|
|
||
| * The application has the `organization_usage` set to `allow` or `require` | ||
| * A transaction was performed in the context of an organization (for example, initiating an authorization transaction with the organization parameter: `/authorize?organization=org_bVss9Do3994SIbiH&…`) | ||
|
|
@@ -63,8 +63,32 @@ The following restrictions apply when using the `{organization_name}` placeholde | |
| * A placeholder must not be prefixed nor suffixed with additional valid hostname characters. `https://prefix-{organization_name}-suffix.exampleco.com` will not work. | ||
| * A placeholder **must not** be used in conjunction with a wildcard in the URL. `https://{organization_name}.*.exampleco.com` will not work. | ||
|
|
||
| ## Custom domain URL placeholders | ||
|
|
||
| You can use `{custom_domain.metadata.KEY}` as a placeholder to dynamically specify a URL based on metada associated with the Custom Domain used in the request. This allows you to support multiple custom domains with different application URLs within the same tenant. | ||
|
|
||
| For more information on configuring metadata, see [Use metadata to stay organized](/docs/customize/custom-domains/multiple-custom-domains/mcd-best-practices#use-metadata-to-stay-organized). | ||
|
|
||
| ### Validation rules | ||
|
|
||
| The following restrictions apply when using Custom Domain placeholders: | ||
|
|
||
| * **Public prefix required**: The metadata key used in the placeholder must start with `public_` or `PUBLIC_` (for example, `{custom_domain.metadata.public_callback_subdomain}`). Keys without this prefix are ignored at runtime for security reasons. | ||
| * **Protocol**: The protocol of the URL must be `http` or `https`. | ||
| * **Location**: The placeholder must be located in the domain or subdomain component. It cannot be used in the URL path. | ||
| * Valid: `https://{custom_domain.metadata.public_app_url}.example.com/login` | ||
| * Invalid: `https://example.com/{custom_domain.metadata.public_path}` | ||
| * **Nesting**: You cannot access nested metadata properties. Only top-level keys are supported. | ||
| * **No wildcards**: A custom domain placeholder must not be used in conjunction with a wildcard (`*`) in the same URL. | ||
| * **Data type**: The value in the custom domain metadata must be a String. IF the key does not exist, or the value is not a String, the URL is ignored during validation. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change IF -> If |
||
|
|
||
| ### Using with Organization placeholders | ||
|
|
||
| You can combine the Custom Domain placeholder with the `{organization_name}` placeholder, as long as your flow supports it. Both placeholders are evaluated and replaced at runtime. | ||
|
|
||
|
|
||
| ## Learn more | ||
|
|
||
| * [Confidential and Public Applications](/docs/get-started/applications/confidential-and-public-applications) | ||
| * [First-Party and Third-Party Applications](/docs/get-started/applications/confidential-and-public-applications/first-party-and-third-party-applications) | ||
| * [Enable Third-Party Applications](/docs/get-started/applications/confidential-and-public-applications/enable-third-party-applications) | ||
| * [Enable Third-Party Applications](/docs/get-started/applications/confidential-and-public-applications/enable-third-party-applications) | ||
Oops, something went wrong.
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.
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.
There are few things missing: