You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/design/customize-with-code/understand-page-design.mdx
+78-10Lines changed: 78 additions & 10 deletions
Display the source diff
Display the rich diff
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.
144
144
145
145
</Aside>
146
146
147
-
### Page structure in the Git directory
147
+
## Page structure in the Git directory
148
148
149
149
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.
150
150
@@ -162,7 +162,7 @@ myApp/
162
162
└── kinde.json
163
163
```
164
164
165
-
### Kinde.json
165
+
## Kinde.json
166
166
167
167
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:
168
168
@@ -177,25 +177,93 @@ The `kinde.json` file defines the config for all custom code in Kinde, including
177
177
178
178
`version` - based on the date when the API version was released. Any breaking changes will be released in a new API version.
179
179
180
-
### Which pages can I customize?
180
+
## Which pages can I customize?
181
181
182
182
All Kinde hosted pages can be customized and use url route mapping to determine which template to use.
183
183
184
184
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.
185
185
186
-
Available routes:
186
+
<Aside type="warning">
187
187
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.
189
189
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 withSSO” 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 withOTP (email or phone).
222
+
223
+
*`(sign_in_use_email_otp)` – Sign inwith 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 screenfor using an authenticator app.
*`(mfa_use_email_otp)` – Enter a one-time email code forMFA.
236
+
*`(mfa_use_phone_otp)` – Enter a one-time phone code forMFA.
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
191
256
192
-
`(login)` - The sign in page
257
+
Shown when a user encounters an error state.
193
258
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.
195
263
196
264
If you want specific customization for a page not listed here, reach out and let us know.
197
265
198
-
###Set the page default exportfunction
266
+
## Set the page default exportfunction
199
267
200
268
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`.
201
269
@@ -225,7 +293,7 @@ The top level `context` key object contains information about the page itself, l
225
293
- `description` the page description
226
294
- `logoAlt` the alt text for your company logo
227
295
228
-
### Page settings
296
+
## Page settings
229
297
230
298
Sometimes additional information needs to be passed to Kinde from your page. You can use the page settings object for this.
0 commit comments