X Enterprises

Configuration

app.config.ts and runtimeConfig reference for @xenterprises/nuxt-x-auth-stack.

Configuration

app.config.ts

export default defineAppConfig({
  xAuth: {
    redirects: {
      login: '/auth/login',
      signup: '/auth/signup',
      afterLogin: '/',
      afterSignup: '/',
      afterLogout: '/auth/login',
      forgotPassword: '/auth/forgot-password',
    },
    features: {
      oauth: false,
      magicLink: false,
      otp: false,
      forgotPassword: true,
      signup: true,
    },
    oauthProviders: [],
  },
})

Schema Reference

KeyTypeDefaultDescription
redirects.loginstring'/auth/login'Path of the login page.
redirects.signupstring'/auth/signup'Path of the signup page.
redirects.afterLoginstring'/'Redirect destination after a successful login.
redirects.afterSignupstring'/'Redirect destination after a successful signup.
redirects.afterLogoutstring'/auth/login'Redirect destination after logout.
redirects.forgotPasswordstring'/auth/forgot-password'Path of the forgot-password page.
features.oauthbooleanfalseEnable OAuth/social login buttons.
features.magicLinkbooleanfalseEnable magic link authentication.
features.otpbooleanfalseEnable OTP (email code) authentication.
features.forgotPasswordbooleantrueEnable forgot-password flow.
features.signupbooleantrueEnable signup page and link.
oauthProviders{ id, label, icon }[][]OAuth providers shown by XAuthOAuthButtonGroup. Each entry requires id (Stack Auth provider name), label (display text), and icon (Iconify class).

oauthProviders example

oauthProviders: [
  { id: 'google', label: 'Google', icon: 'i-simple-icons-google' },
  { id: 'github', label: 'GitHub', icon: 'i-simple-icons-github' },
]

Runtime Config / Environment Variables

VariableRequiredDescription
NUXT_PUBLIC_STACK_PROJECT_IDYesStack Auth project ID.
NUXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEYYesStack Auth publishable client key.

AI Context

package: "@xenterprises/nuxt-x-auth-stack"
config-key: xAuth
use-when: >
  Configuring redirect paths, enabling/disabling features (OAuth, magic link,
  OTP, forgot password, signup), or listing OAuth providers for nuxt-x-auth-stack.
  Set NUXT_PUBLIC_STACK_PROJECT_ID and NUXT_PUBLIC_STACK_PUBLISHABLE_CLIENT_KEY
  in environment variables to connect the layer to your Stack Auth project.
Copyright © 2026