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
+76-6Lines changed: 76 additions & 6 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,13 +177,19 @@ 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
+
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
+
190
+
</Aside>
191
+
192
+
Common routes
187
193
188
194
`(default)` - The page template that will be used for all Kinde hosted pages when a specific one cannot be found.
189
195
@@ -193,9 +199,73 @@ Available routes:
193
199
194
200
`(index)` - If someone visits the root domain for your business, e.g. `https://<yourdomain>.kinde.com`
195
201
202
+
Errors
203
+
204
+
`(account_locked)`
205
+
206
+
`(account_not_found)`
207
+
208
+
`(error)`
209
+
210
+
`(invalid_redirect_url)`
211
+
212
+
Authentication &MFA
213
+
214
+
`(clickwrap)`
215
+
216
+
`(sso_home_realm)`
217
+
218
+
`(provide_email)`
219
+
220
+
`(mfa_authenticator_app)`
221
+
222
+
`(mfa_method_selection)`
223
+
224
+
`(mfa_setup_email)`
225
+
226
+
`(mfa_setup_phone)`
227
+
228
+
`(mfa_use_email_otp)`
229
+
230
+
`(mfa_use_phone_otp)`
231
+
232
+
`(mfa_use_recovery_code)`
233
+
234
+
`(mfa_view_recovery_codes)`
235
+
236
+
Passwords
237
+
238
+
`(reset_password)`
239
+
240
+
`(reset_password_verify_email_otp)`
241
+
242
+
`(set_password)`
243
+
244
+
`(verify_password)`
245
+
246
+
Verify code
247
+
248
+
`(sign_in_sign_up_use_phone_otp)`
249
+
250
+
`(sign_in_use_email_otp)`
251
+
252
+
`(sign_up_use_email_otp)`
253
+
254
+
`(subscription_success)`
255
+
256
+
Other routes
257
+
258
+
`(request_access)`- before you launch and want to collect subscribers
259
+
260
+
`(request_access_success)`
261
+
262
+
`(choose_plan)`- coming soon, relates to billing
263
+
264
+
`(collect_payment_details)`- coming soon, related to billing
265
+
196
266
If you want specific customization for a page not listed here, reach out and let us know.
197
267
198
-
###Set the page default exportfunction
268
+
## Set the page default exportfunction
199
269
200
270
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
271
@@ -225,7 +295,7 @@ The top level `context` key object contains information about the page itself, l
225
295
- `description` the page description
226
296
- `logoAlt` the alt text for your company logo
227
297
228
-
### Page settings
298
+
## Page settings
229
299
230
300
Sometimes additional information needs to be passed to Kinde from your page. You can use the page settings object for this.
0 commit comments