The Authentication UI allows the user to log in or register with Corbado.
The UI is rendered by using the Corbado.mountAuthUI method.
Once the user is logged in, the onLoggedIn callback is executed.
routes/+page.svelte
Copy
Ask AI
<script lang="ts"> import Corbado from '@corbado/web-js'; import {goto} from '$app/navigation'; import {isCorbadoLoaded} from "../corbadoStore"; let authElement: HTMLDivElement; $: if ($isCorbadoLoaded) { Corbado.mountAuthUI( authElement, { onLoggedIn: () => goto("/profile"), }) }</script><div bind:this={authElement}></div>
Corbado UI Components can be customized to match your application’s design and language preferences. You can adjust the styling and translations of the components to create a seamless user experience: