X Enterprises

Configuration

xAuth app.config.ts, branding, consents, and runtimeConfig for nuxt-x-auth-nile.

Configuration

All consumer overrides live in app/app.config.ts (Nuxt 4 app/ directory). An app.config.ts at the project root is ignored and you only get Nuxt UI defaults.

app/app.config.ts
export default defineAppConfig({
  ui: {
    colors: { primary: 'emerald', neutral: 'zinc' },
  },
  xAuth: {
    publicRoutes: ['/legal'],
    redirects: {
      login: '/auth/login',
      signup: '/auth/signup',
      afterLogin: '/',
      afterSignup: '/',
      afterLogout: '/auth/login',
      forgotPassword: '/auth/forgot-password',
    },
    features: {
      oauth: false,
      mfa: false,
      forgotPassword: true,
      signup: true,
      createTenant: false,
    },
    oauthProviders: [
      { id: 'google', label: 'Google', icon: 'i-simple-icons-google' },
    ],
    ui: {
      layout: 'centered',
      showLogo: true,
      showBrandName: true,
      showTagline: true,
      brandName: 'Acme',
      tagline: 'Operations',
      logoIcon: 'i-lucide-hexagon',
      background: {
        enabled: true,
        imageUrl: '/auth-bg.jpg',
        overlayOpacity: 55,
        blur: true,
      },
      consents: [
        { id: 'tos', label: 'Terms of Service', to: '/legal/terms' },
        { id: 'privacy', label: 'Privacy Policy', to: '/legal/privacy' },
      ],
      legal: {
        copyright: 'Acme',
        links: [
          { label: 'Terms', to: '/legal/terms' },
          { label: 'Privacy', to: '/legal/privacy' },
        ],
      },
    },
  },
})

The overlay on the centered layout tints with ui.colors.primary.

Schema reference

KeyTypeDefaultDescription
publicRoutesstring[][]Extra public routes (exact or prefix). /auth/handler/*, /auth/logout, and /auth/reset-password are always public.
redirects.loginstring'/auth/login'Login path. Guest-only.
redirects.signupstring'/auth/signup'Signup path. Guest-only.
redirects.afterLoginstring'/'After successful login.
redirects.afterSignupstring'/'After signup with a session. Verification-required signup stays on check-email.
redirects.afterLogoutstring'/auth/login'After logout.
redirects.forgotPasswordstring'/auth/forgot-password'Forgot-password page path.
features.oauthbooleanfalseShow OAuth buttons when providers are configured.
features.mfabooleanfalseEnable /auth/mfa. Off → that page redirects to login.
features.forgotPasswordbooleantrueEnable password reset.
features.signupbooleantrueEnable signup (off → /auth/signup redirects to login).
features.createTenantbooleanfalseNile creates a tenant named after the user’s email on signup.
oauthProviders{ id, label, icon }[]unsetOAuth buttons. Empty/unset = no buttons (no silent Google).
socialLoginProvidersstring[]unsetLegacy provider ids if oauthProviders is omitted.
ui.layout'centered' | 'split''centered'Auth chrome.
ui.showLogobooleantrueShow logoUrl / logoIcon.
ui.showBrandNamebooleantrueShow brandName under the logo.
ui.showTaglinebooleantrueShow tagline under the brand name.
ui.brandNamestring''Brand title.
ui.taglinestring''Small label under the brand.
ui.logoUrlstring''Logo image.
ui.logoIconstring''Iconify icon when logoUrl is empty.
ui.background.enabledbooleantruePhoto backdrop on the centered layout.
ui.background.imageUrlstring''Background image (Unsplash fallback when empty).
ui.background.overlayOpacitynumber55Overlay strength 0–100. Overlay uses ui.colors.primary.
ui.background.blurbooleantrueBlur the photo under the overlay.
ui.split.*object—Hero copy/image when layout is 'split'.
ui.legal.copyrightstringbrand nameLeft-side footer copyright.
ui.legal.links{ label, to }[][]Right-side footer links.
ui.form.showSeparatorbooleantrue“or” divider above OAuth (hidden when there are no providers).
ui.consents{ id, label, description?, to?, required? }[][]Signup checkboxes. required defaults to true. Empty = hidden. Google/GitHub stay disabled until required boxes are checked. to opens in a new tab.

Site-overridable strings on the layer should stay undefined in your overrides when you want the layer default; empty strings win the merge.

Runtime config / environment

Maps to runtimeConfig.public.nile:

VariableRuntime configRequiredDescription
NUXT_PUBLIC_NILE_BASE_URLpublic.nile.baseUrlNoAuth API origin. Unset → current page origin.
NUXT_PUBLIC_NILE_BASE_PATHpublic.nile.basePathNoPath on that origin (typically /api).
Point the browser at same-origin /api (Fastify + Vite proxy, or the UI and API on one host). Hosted *.api.thenile.dev is CORS-blocked for cookie sessions.

AI Context

package: "@xenterprises/nuxt-x-auth-nile"
config-key: xAuth
use-when: >
  Configuring redirects, features (OAuth, MFA, forgot password, signup,
  tenant creation), oauthProviders, xAuth.ui branding/consents/legal,
  or publicRoutes. Leave NUXT_PUBLIC_NILE_BASE_URL empty for same-origin
  /api; do not point the browser at hosted Nile.
Copyright © 2026