LoginModal
Choose from the login providers enabled on the Allmaps API.
Playground
Usage
LoginModal uses the shared Modal with the AllmapsLogo in its title. Choosing a provider in the playground signs you in locally for the demo.
<script lang="ts"> import { LoginModal } from '@allmaps/ui/auth' import { Button } from '@allmaps/ui/button'
let open = $state(false)</script>
<Button onclick={() => (open = true)}>Log in</Button><LoginModal bind:open />Props
| Prop | Behavior |
|---|---|
open |
Bind the dialog’s open state. Escape, the close button, and a click outside dismiss it. |
apiBaseUrl |
Allmaps API root used to discover enabled providers when the modal opens. Defaults to https://api.allmaps.org. |
signInProviders |
Optional preloaded list of provider links. Omit to discover all enabled providers and return to the current page after login. |
signInURL |
Optional direct login URL. Used when no explicit provider links are supplied, and skips discovery. |
returnFocus |
Optional element to focus when the dialog closes. Use this when the opener is inside a dropdown that closes. |