import { ScryptConfig } from '@adonisjs/hash/types'; import { GenerateRegistrationOptionsOpts, GenerateAuthenticationOptionsOpts } from '@simplewebauthn/server'; import { SessionConfig } from 'nuxt/server'; import { OAuthRuntimeConfig } from '../dist/runtime/types/oauth-runtime-config.js'; interface WebAuthnOptions { /** * Relying Party ID the passkeys are bound to. * * Set the registrable parent domain (such as `example.com`) to create and use passkeys across subdomains. * @default the request hostname */ rpID?: string; /** * Relying Party name shown by the authenticator when creating a passkey * @default the request hostname */ rpName?: string; } interface ModuleOptions { /** * Enable WebAuthn (Passkeys) * @default false */ webAuthn?: boolean | WebAuthnOptions; /** * Enable atproto OAuth (Bluesky, etc.) * @default false */ atproto?: boolean; /** * Hash options used for password hashing */ hash?: { /** * scrypt options used for password hashing */ scrypt?: ScryptConfig; }; /** * Session load strategy * @default 'server-first' */ loadStrategy?: 'server-first' | 'client-only' | 'none'; } declare module 'nuxt/schema' { interface RuntimeConfig { hash: { scrypt: ScryptConfig; }; /** * Session configuration, the session is sealed with a secret derived from `appSecret` (`NUXT_APP_SECRET`) */ session: Omit; /** * WebAuthn settings, `rpID` and `rpName` are set from the `webAuthn` module option. * * Both can be overridden at runtime with `NUXT_WEBAUTHN_RP_ID` and `NUXT_WEBAUTHN_RP_NAME`. * * `register` and `authenticate` are merged into the options passed to * `generateRegistrationOptions()` and `generateAuthenticationOptions()`. */ webauthn: { rpID: string; rpName: string; register: Partial; authenticate: Partial; }; /** * OAuth providers configuration, one key per provider (`github`, `google`, `keycloak`, ...). */ oauth: OAuthRuntimeConfig; } interface PublicRuntimeConfig { auth: { loadStrategy: 'server-first' | 'client-only' | 'none'; }; } } declare const _default: any; export { _default as default }; export type { ModuleOptions, WebAuthnOptions };