Before we can begin to render the Corbado Authentication UI, the Corbado.load() call has to resolve. Find more here.

Integration

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
<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>

Customize Styling and Translations

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:

Next

Let your users manage their passkeys with the PasskeyList.