-
Notifications
You must be signed in to change notification settings - Fork 49
Update understand-page-design.mdx #429
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
Merged
Merged
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -144,7 +144,7 @@ If you are using React for templating, note this code is rendered on the server. | |
|
|
||
| </Aside> | ||
|
|
||
| ### Page structure in the Git directory | ||
| ## Page structure in the Git directory | ||
|
|
||
| The code for your pages must live in a GitHub repository (other git providers to be supported later). Your directory structure in the repo is critical to Kinde being able to run your design code. | ||
|
|
||
|
|
@@ -162,7 +162,7 @@ myApp/ | |
| └── kinde.json | ||
| ``` | ||
|
|
||
| ### Kinde.json | ||
| ## Kinde.json | ||
|
|
||
| The `kinde.json` file defines the config for all custom code in Kinde, including workflows and custom pages. A typical config file will look as follows: | ||
|
|
||
|
|
@@ -177,13 +177,19 @@ The `kinde.json` file defines the config for all custom code in Kinde, including | |
|
|
||
| `version` - based on the date when the API version was released. Any breaking changes will be released in a new API version. | ||
|
|
||
| ### Which pages can I customize? | ||
| ## Which pages can I customize? | ||
|
|
||
| All Kinde hosted pages can be customized and use url route mapping to determine which template to use. | ||
|
|
||
| If a specific mapped route does not exist, a special route called `(default)` will be rendered. Set up the `(default)` page to ensure all your pages follow this design unless you have overridden them with custom code. | ||
|
|
||
| Available routes: | ||
| <Aside type="warning"> | ||
|
|
||
| Once you start customizing pages, it's on you not to break them. We recommend always applying custom code to pages in a non-prod environment first. | ||
|
|
||
| </Aside> | ||
|
|
||
| Common routes | ||
|
|
||
| `(default)` - The page template that will be used for all Kinde hosted pages when a specific one cannot be found. | ||
|
|
||
|
|
@@ -193,9 +199,73 @@ Available routes: | |
|
|
||
| `(index)` - If someone visits the root domain for your business, e.g. `https://<yourdomain>.kinde.com` | ||
|
|
||
| Errors | ||
|
||
|
|
||
| `(account_locked)` | ||
|
|
||
| `(account_not_found)` | ||
|
|
||
| `(error)` | ||
|
|
||
| `(invalid_redirect_url)` | ||
|
|
||
| Authentication & MFA | ||
|
|
||
| `(clickwrap)` | ||
|
|
||
| `(sso_home_realm)` | ||
|
|
||
| `(provide_email)` | ||
|
|
||
| `(mfa_authenticator_app)` | ||
|
|
||
| `(mfa_method_selection)` | ||
|
|
||
| `(mfa_setup_email)` | ||
|
|
||
| `(mfa_setup_phone)` | ||
|
|
||
| `(mfa_use_email_otp)` | ||
|
|
||
| `(mfa_use_phone_otp)` | ||
|
|
||
| `(mfa_use_recovery_code)` | ||
|
|
||
| `(mfa_view_recovery_codes)` | ||
|
|
||
| Passwords | ||
|
|
||
| `(reset_password)` | ||
|
|
||
| `(reset_password_verify_email_otp)` | ||
|
|
||
| `(set_password)` | ||
|
|
||
| `(verify_password)` | ||
|
|
||
| Verify code | ||
|
|
||
| `(sign_in_sign_up_use_phone_otp)` | ||
|
|
||
| `(sign_in_use_email_otp)` | ||
|
|
||
| `(sign_up_use_email_otp)` | ||
|
|
||
| `(subscription_success)` | ||
|
|
||
| Other routes | ||
|
|
||
| `(request_access)` - before you launch and want to collect subscribers | ||
|
|
||
| `(request_access_success)` | ||
|
|
||
| `(choose_plan)` - coming soon, relates to billing | ||
|
|
||
| `(collect_payment_details)` - coming soon, related to billing | ||
|
|
||
| If you want specific customization for a page not listed here, reach out and let us know. | ||
|
|
||
| ### Set the page default export function | ||
| ## Set the page default export function | ||
|
|
||
| Your `page.[ext]` file should contain a default export. It doesn’t matter what this is called, but the general convention is to call it `Page`. This is provided a single `event` argument which is an object containing 2 keys `context` and `request`. | ||
|
|
||
|
|
@@ -225,7 +295,7 @@ The top level `context` key object contains information about the page itself, l | |
| - `description` the page description | ||
| - `logoAlt` the alt text for your company logo | ||
|
|
||
| ### Page settings | ||
| ## Page settings | ||
|
|
||
| Sometimes additional information needs to be passed to Kinde from your page. You can use the page settings object for this. | ||
|
|
||
|
|
||
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.
Missing markdown for “Common routes” heading
The “Common routes” line is not prefixed with a heading marker. It should be defined as an H3 (e.g.,
### Common routes) under the current H2 context to maintain consistent styling.Please apply:
📝 Committable suggestion
🤖 Prompt for AI Agents