Use your own custom domain
Build on Kinde
You can use logos and favicons managed in Kinde, or host stylesheets, fonts, and images externally.
In your custom code, you can reference assets uploaded in the Kinde admin. The Kinde infrastructure package includes helpers for accessing them:
import {getFallbackFaviconUrl, getSVGFaviconUrl} from "@kinde/infrastructure";<link rel="icon" href={getFallbackFaviconUrl()} sizes="48x48"><link rel="icon" href={getSVGFaviconUrl()} type="image/svg+xml" />import {getLogoUrl, getDarkModeLogoUrl} from "@kinde/infrastructure";// Always use light logo<img src={getLogoUrl()} alt={event.context.widget.content.logo_alt}/>
// Always use dark logo<img src={getDarkModeLogoUrl()} alt={event.context.widget.content.logo_alt}/>
// User preference<picture> <source media="(prefers-color-scheme: dark)" srcset={getDarkModeLogoUrl()} > <img src={getLogoUrl()} alt={event.context.widget.content.logo_alt} /></picture>Both logo functions accept the org code as an argument to return the relevant organization logo URL:
// Pass org code inconst {orgCode} = event.request.authUrlParams<img src={getLogoUrl(orgCode)} alt={event.context.widget.content.logo_alt}/>You can also use stylesheets, fonts, and images. Kinde does not host these static assets, so you need to host them yourself.
Your root domain and its subdomains are added to the Content Security Policy (CSP) by default. To use your own assets and comply with Kinde’s CSP, store them on servers that share the same domain as your custom domain.
For example, if you use the custom domain auth.myapp.com, you can host fonts, images, and CSS at assets.myapp.com and access them in your code.