Reference

IdP Configuration

Complete configuration reference for @openape/nuxt-auth-idp.

IdP Configuration

All configuration options for the @openape/nuxt-auth-idp Nuxt module.

Module Options

Configure in nuxt.config.ts under the openapeIdp key:

export default defineNuxtConfig({
  modules: ['@openape/nuxt-auth-idp'],
  openapeIdp: {
    rpName: 'My IdP',
    rpID: 'id.example.com',
    rpOrigin: 'https://id.example.com',
    managementToken: process.env.MANAGEMENT_TOKEN,
    sessionSecret: process.env.SESSION_SECRET
  }
})

Core Options

OptionTypeDefaultEnv VarDescription
rpNamestring''NUXT_OPENAPE_IDP_RP_NAMEWebAuthn relying party name (shown during registration)
rpIDstring''NUXT_OPENAPE_IDP_RP_IDWebAuthn relying party ID (usually the domain, e.g., id.example.com)
rpOriginstring''NUXT_OPENAPE_IDP_RP_ORIGINWebAuthn relying party origin (full URL, e.g., https://id.example.com)
issuerstring''NUXT_OPENAPE_IDP_ISSUEROAuth issuer URL (defaults to rpOrigin if not set)
managementTokenstring''NUXT_OPENAPE_IDP_MANAGEMENT_TOKENManagement API token for admin operations
adminEmailsstring''NUXT_OPENAPE_IDP_ADMIN_EMAILSComma-separated admin email addresses
The managementToken is the most critical security credential in an OpenApe deployment. See the Threat Model for handling guidelines.

Session Options

OptionTypeDefaultEnv VarDescription
sessionSecretstring'change-me-...'NUXT_OPENAPE_IDP_SESSION_SECRETSession encryption secret (min. 32 characters)
sessionMaxAgenumber604800NUXT_OPENAPE_IDP_SESSION_MAX_AGESession max age in seconds (default: 7 days)

WebAuthn Options

OptionTypeDefaultDescription
requireUserVerificationbooleanfalseRequire biometrics/PIN for every authentication
residentKey'preferred' | 'required' | 'discouraged''preferred'Discoverable credential policy
attestationType'none' | 'indirect' | 'direct' | 'enterprise''none'Attestation conveyance preference

Storage Options

OptionTypeDefaultEnv VarDescription
storageKeystring'openape-idp'NUXT_OPENAPE_IDP_STORAGE_KEYKey prefix for user data storage

Storage uses Nitro's built-in storage layer. Configure the driver in nitro.storage:

export default defineNuxtConfig({
  nitro: {
    storage: {
      'openape-idp': {
        driver: 's3',
        bucket: 'my-openape-bucket',
        region: 'eu-central-1'
      }
    }
  }
})

Federation Options

OptionTypeDefaultDescription
federationProvidersstring''Federation providers as JSON string

Grants Configuration

Configure under openapeIdp.grants:

openapeIdp: {
  grants: {
    enablePages: true,
    storageKey: 'openape-grants'
  }
}
OptionTypeDefaultDescription
enablePagesbooleantrueEnable /grants, /grant-approval, /enroll pages
storageKeystring'openape-grants'Key prefix for grant data storage

Route Configuration

Control which route groups are enabled:

openapeIdp: {
  routes: {
    auth: true,
    oauth: true,
    grants: true,
    admin: true,
    agent: true
  }
}
OptionTypeDefaultRoutes
authbooleantrue/api/logout, /api/me, /api/webauthn/*, federation routes
oauthbooleantrue/authorize, /token, /revoke, /.well-known/*, /userinfo
grantsbooleantrue/api/grants/*, /api/delegations/*
adminbooleantrue/api/admin/users/*, /api/admin/agents/*, /api/admin/sessions/*, /api/admin/registration-urls/*
agentbooleantrue/api/agent/challenge, /api/agent/authenticate, /api/agent/enroll

Set routes: false to disable all routes (useful if you only need the storage layer).

Pages

OptionTypeDefaultDescription
pagesbooleantrueEnable built-in pages

Built-in pages:

  • /login — login form with Passkey
  • /register — new user registration (via registration URL)
  • /account — account management
  • /admin — admin dashboard
  • /grants — grant dashboard (if grants.enablePages)
  • /grant-approval — approve/deny UI (if grants.enablePages)
  • /enroll — agent enrollment form (if grants.enablePages)

Set pages: false to use your own custom pages while keeping the API routes.

Production Checklist

  • Set a strong sessionSecret (32+ random characters)
  • Set managementToken to a unique, random value
  • Set rpID to your production domain
  • Set rpOrigin to your full production URL (with https://)
  • Configure persistent storage (S3 or filesystem — NOT the default in-memory storage)
  • Set adminEmails to trusted administrator addresses
  • Never expose managementToken in client-side code or agent configs