Skip to content

Commit 25d0104

Browse files
authored
feat: make manage assets more explicit
1 parent 718425f commit 25d0104

File tree

1 file changed

+17
-24
lines changed

1 file changed

+17
-24
lines changed
Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,39 @@
11
---
22
page_id: 14aeb42e-8799-481c-88cf-62f521b33d5e
3-
title: Manage page design assets
3+
title: Manage assets
44
sidebar:
55
order: 6
66
relatedArticles:
77
- f0bc688b-a817-42ab-9a20-8e09cec06f37
88
- 66f83c18-d261-48b8-a517-648ed1b7b064
99
---
1010

11-
It is likely that your logos and favicons are hosted on Kinde, but you may also manage externally hosted assets. Here's how assets are referenced in your custom code.
11+
It is likely that your logos and favicons are managed in Kinde, but you may also manage externally hosted assets like stylesheets, fonts, and images.
1212

13-
## Favicons
13+
## Kinde hosted assets
1414

15-
The Kinde infrastructure package ships with helper methods for accessing these:
15+
Within your custom code you can reference assets which have been uploaded within the Kinde admin area. The Kinde infrastructure package ships with helper methods for accessing these:
16+
17+
### Favicons
1618

1719
```jsx
18-
import {
19-
getFallbackFaviconUrl,
20-
getSVGFaviconUrl,
21-
} from "@kinde/infrastructure";
20+
import {getFallbackFaviconUrl, getSVGFaviconUrl} from "@kinde/infrastructure";
2221
```
2322

24-
### Usage
23+
#### Usage
2524

2625
```jsx
2726
<link rel="icon" href={getFallbackFaviconUrl()} sizes="48x48">
2827
<link rel="icon" href={getSVGFaviconUrl()} type="image/svg+xml" />
2928
```
3029

31-
## Logos
32-
33-
The Kinde infrastructure package ships with helper methods for accessing these:
30+
### Logos
3431

3532
```jsx
36-
import {
37-
getLogoUrl,
38-
getDarkModeLogoUrl,
39-
} from "@kinde/infrastructure";
33+
import {getLogoUrl, getDarkModeLogoUrl} from "@kinde/infrastructure";
4034
```
4135

42-
### Usage
36+
#### Usage
4337

4438
```jsx
4539
// Always use light logo
@@ -67,12 +61,11 @@ import {
6761
</picture>
6862
```
6963

70-
## Org logos
64+
### Org logos
7165

72-
Both functions accept the org code as an argument to return the relevant organization logo url:
66+
Both logo functions accept the org code as an argument to return the relevant organization logo url:
7367

7468
```jsx
75-
// Org logos
7669
// Pass org code in
7770
const {orgCode} = event.request.authUrlParams
7871
<img
@@ -81,10 +74,10 @@ const {orgCode} = event.request.authUrlParams
8174
/>
8275
```
8376

84-
## Storing externally-hosted assets
77+
## External CSS files, fonts and images
8578

86-
We know you will want to use assets like fonts and images stored outside of Kinde. Our strict CSP which we have for security, can make calling external sources somewhat trickier, but with good reason.
79+
We know you will want to use assets like stylesheets, fonts and images. Kinde does not currently offer hosting for these static assets and you will need to host them yourself.
8780

88-
Your root domain as well as any subdomains of that domain are added to our CSP by default so to use your own assets and comply with Kinde’s CSP, the assets should be stored on servers that share the same domain as your custom domain.
81+
Your root domain as well as any subdomains of that domain are added to our Content-Security-Policy (CSP) by default so to use your own assets and comply with Kinde’s CSP, the assets should be stored on servers that share the same domain as your custom domain.
8982

90-
For example, if you are using the custom domain [`auth.myapp.com`](http://auth.myapp.com) you could host fonts/images/css at [`https://assets.myapp.com`](https://assets.myapp.com) and they would be accessible in your code.
83+
For example, if you are using the custom domain `auth.myapp.com` you could host your external fonts, images and CSS files at `assets.myapp.com` and they would be accessible in your code.

0 commit comments

Comments
 (0)