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

PropTypeDefaultDescription
type'oauth' | 'password-reset' | 'callback'requiredWhich auth callback flow to handle
redirectTostringxAuth.redirects.afterLogin (falls back to '/')Where to navigate after a successful callback
redirectDelaynumber1500Milliseconds to wait before redirecting

Slots

SlotPropsDescription
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
Copyright © 2026