Skip to content

Commit 3c9f685

Browse files
Merge pull request #429 from kinde-oss/feat/custom-ui-pages
Update understand-page-design.mdx
2 parents 220ff06 + bac54d0 commit 3c9f685

File tree

1 file changed

+78
-10
lines changed

1 file changed

+78
-10
lines changed

src/content/docs/design/customize-with-code/understand-page-design.mdx

Lines changed: 78 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ If you are using React for templating, note this code is rendered on the server.
144144
145145
</Aside>
146146
147-
### Page structure in the Git directory
147+
## Page structure in the Git directory
148148
149149
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.
150150
@@ -162,7 +162,7 @@ myApp/
162162
└── kinde.json
163163
```
164164
165-
### Kinde.json
165+
## Kinde.json
166166
167167
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:
168168
@@ -177,25 +177,93 @@ The `kinde.json` file defines the config for all custom code in Kinde, including
177177
178178
`version` - based on the date when the API version was released. Any breaking changes will be released in a new API version.
179179
180-
### Which pages can I customize?
180+
## Which pages can I customize?
181181
182182
All Kinde hosted pages can be customized and use url route mapping to determine which template to use.
183183
184184
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.
185185
186-
Available routes:
186+
<Aside type="warning">
187187
188-
`(default)` - The page template that will be used for all Kinde hosted pages when a specific one cannot be found.
188+
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.
189189
190-
`(register)` - The sign up page
190+
</Aside>
191+
192+
### Common pages
193+
194+
These are the most frequently used or fallback pages.
195+
196+
* `(default)` – Fallback template used when a specific page is not found.
197+
* `(register)` – The sign-up page.
198+
* `(login)` – The sign-in page.
199+
* `(index)` – Landing page when visiting the root domain (e.g. `https://<yourdomain>.kinde.com`).
200+
201+
### Authentication
202+
203+
Pages involved in initiating authentication flows.
204+
* `(register)` – The sign-up page.
205+
* `(login)` – The sign-in page.
206+
* `(sso_home_realm)` – Displayed when a user selects “Continue with SSO” to choose their identity provider.
207+
* `(provide_email)` – Shown when using a social login provider that does not return an email address.
208+
* `(clickwrap)` – Displays terms and conditions or agreements that must be accepted.
209+
210+
### Password flows
211+
212+
Used in password-based authentication and recovery.
213+
214+
* `(verify_password)` – Shown during sign-in when using a password-based method.
215+
* `(set_password)` – Shown during a password-based sign-up flow.
216+
* `(reset_password_verify_email_otp)` – First step of the reset flow where the user verifies identity using an email OTP.
217+
* `(reset_password)` – Password entry screen shown after verification during the reset flow.
218+
219+
### One-Time Passcode (OTP) verification
220+
221+
Used in sign-in and sign-up flows with OTP (email or phone).
222+
223+
* `(sign_in_use_email_otp)` – Sign in with a one-time email code.
224+
* `(sign_up_use_email_otp)` – Sign up with a one-time email code.
225+
* `(sign_in_sign_up_use_phone_otp)` – Sign in or sign up with a one-time phone code.
226+
227+
### Multi-Factor Authentication (MFA)
228+
229+
Shown after primary authentication when MFA is required or being set up.
230+
231+
* `(mfa_method_selection)` – User selects their preferred MFA method.
232+
* `(mfa_authenticator_app)` – Setup screen for using an authenticator app.
233+
* `(mfa_setup_email)` – Setup screen for email-based MFA.
234+
* `(mfa_setup_phone)` – Setup screen for phone-based MFA.
235+
* `(mfa_use_email_otp)` – Enter a one-time email code for MFA.
236+
* `(mfa_use_phone_otp)` – Enter a one-time phone code for MFA.
237+
* `(mfa_use_recovery_code)` – Enter a recovery code if unable to use other MFA methods.
238+
* `(mfa_view_recovery_codes)` – View and save MFA recovery codes.
239+
240+
### Billing (coming soon)
241+
242+
Pages related to choosing a plan and making a payment.
243+
244+
* `(choose_plan)` – User selects a subscription plan.
245+
* `(collect_payment_details)` – User enters billing information.
246+
* `(subscription_success)` – Confirmation page shown after successful subscription.
247+
248+
### Early access
249+
250+
Pages for gated access to your product before full launch.
251+
252+
* `(request_access)` – Request early access to your product.
253+
* `(request_access_success)` – Confirmation page after a request is submitted.
254+
255+
### Error pages
191256

192-
`(login)` - The sign in page
257+
Shown when a user encounters an error state.
193258

194-
`(index)` - If someone visits the root domain for your business, e.g. `https://<yourdomain>.kinde.com`
259+
* `(account_locked)` – The user’s account has been locked.
260+
* `(account_not_found)` – No account was found for the entered credentials.
261+
* `(invalid_redirect_url)` – The redirect URL is invalid or not on the allowed list.
262+
* `(error)` – Generic error screen.
195263

196264
If you want specific customization for a page not listed here, reach out and let us know.
197265

198-
### Set the page default export function
266+
## Set the page default export function
199267

200268
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`.
201269

@@ -225,7 +293,7 @@ The top level `context` key object contains information about the page itself, l
225293
- `description` the page description
226294
- `logoAlt` the alt text for your company logo
227295

228-
### Page settings
296+
## Page settings
229297

230298
Sometimes additional information needs to be passed to Kinde from your page. You can use the page settings object for this.
231299

0 commit comments

Comments
 (0)