nuxt-x-auth-nile
Handler
Generic auth callback handler for Nile Auth — OAuth round-trips, password reset, and generic callbacks.
Handler
The XAuthHandler component handles auth callback types for Nile Auth. Pass the type prop to specify which flow to complete. Used on the /auth/handler/[...slug] page — the OAuth sign-in flow defaults its callback to /auth/handler/oauth-callback.
Components
<XAuthHandler />
Mount on the handler page with the appropriate type.
<XAuthHandler type="oauth" redirect-to="/dashboard" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
type | 'oauth' | 'password-reset' | 'callback' | required | Which auth callback flow to handle |
redirectTo | string | xAuth.redirects.afterLogin (falls back to '/') | Where to navigate after a successful callback |
redirectDelay | number | 1500 | Milliseconds to wait before redirecting |
Slots
| Slot | Props | Description |
|---|---|---|
loading | — | Shown while the callback is being verified (default: spinner) |
error | { error } | Shown when the callback failed (default: error card) |
success | — | Shown before the redirect fires (default: success card) |
Behaviour: Nile surfaces auth failures as an error query param on the callback URL — when present, the handler renders the error state immediately. For oauth and callback types it confirms a session exists via currentUser() before redirecting; for password-reset nothing is verified client-side (the reset form collects the new password).
AI Context
component: XAuthHandler
package: "@xenterprises/nuxt-x-auth-nile"
use-when: Auth callback page for Nile Auth — completes OAuth round-trips, password-reset links, and generic auth callbacks
