--- ## LoginPage Pre-built login page with email/password, optional passkey, and remember-me. Sends POST to `apiPath` (default `/api/auth/login`). Pair with `createLoginHandler(authDeps)` on the server. **Import:** `import { LoginPage } from '@urbicon-ui/auth';` ### Examples ```svelte goto('/')} /> ``` ### Api | Prop | Type | Required | Default | Description | | --- | --- | :---: | --- | --- | | apiPath | `string` | no | '/api/auth/login' | API endpoint for the login request. | | class | `string` | no | | Extra classes on the root element. | | csrf | `CsrfClientOptions` | no | | CSRF cookie/header names — only needed when the server overrides the defaults via `config.csrf`. Mutating requests echo the token automatically. | | fetcher | `typeof globalThis.fetch` | no | | Custom fetch implementation for all API calls. Defaults to the global `fetch`. Useful for mock backends in demos/tests or custom retry/auth layers. | | footer | `Snippet` | no | | Content rendered below the form, above links (e.g. terms checkbox). | | forgotPasswordUrl | `string` | no | '/auth/forgot-password' | URL for the forgot-password page link. | | header | `Snippet` | no | | Content rendered above the form (e.g. social login buttons, welcome text). | | links | `Snippet` | no | | Replaces the link area below the form. | | mode | `'password' | 'passkey' | 'both'` | no | 'both' | Login mode. `'password'` shows only email/password, `'passkey'` shows only passkey button, `'both'` shows both with separator. | | onSuccess | `() => void` | no | | Called after successful login. | | passkeyApiPath | `string` | no | undefined | Passkey API base path. Required when mode is `'passkey'` or `'both'`. | | registerUrl | `string` | no | '/auth/register' | URL for the register page link. | | rememberMe | `boolean` | no | false | Show a "Remember me" checkbox. When checked, sends `rememberMe: true` in the login request body. | | slotClasses | `AuthPageSlotClasses` | no | | Per-slot class overrides. Keys: `root`, `card`, `title`, `form`, `field`, `submit`, `error`, `success`, `links`. | | t | `AuthLocale` | no | | Locale bundle. Auto-detected from i18n context when omitted. | | twoFactorApiPath | `string` | no | '/api/auth/2fa/verify' | API endpoint for the 2FA verify step. When the login response signals `twoFactorRequired`, the page switches to a code-entry step that POSTs here. Pair with `createTwoFactorVerifyHandler`. | | unstyled | `boolean` | no | | Strip all default styling. |