Skip to content

/sign-in/email-otp OpenAPI spec missing requestBody #9679

@JohnCido

Description

@JohnCido

Is this suited for github?

  • Yes, this is suited for github

Reproduction

  1. Add openAPI and emailOTP plugin
  2. Download the OpenAPI spec from /[basePath]/open-api/generate-schema

Current vs. Expected behavior

...
"/sign-in/email-otp": {
  "post": {
    "tags": [
      "Email-otp"
    ],
    "description": "Sign in with email and OTP",
    "operationId": "signInWithEmailOTP",
    "security": [
      {
        "bearerAuth": []
      }
    ],
    "parameters": [],
    "responses": {
...
...
"/sign-in/email-otp": {
  "post": {
    "tags": [
      "Email-otp"
    ],
    "description": "Sign in with email and OTP",
    "operationId": "signInWithEmailOTP",
    "security": [
      {
        "bearerAuth": []
      }
    ],
    "parameters": [],
+   "requestBody" {...},
    "responses": {
...

What version of Better Auth are you using?

1.6.11

System info

{
  "system": {
    "platform": "darwin",
    "arch": "arm64",
    "version": "Darwin Kernel Version 25.4.0: Thu Mar 19 19:30:44 PDT 2026; root:xnu-12377.101.15~1/RELEASE_ARM64_T6000",
    "release": "25.4.0",
    "cpuCount": 8,
    "cpuModel": "Apple M1 Pro",
    "totalMemory": "16.00 GB",
    "freeMemory": "0.21 GB"
  },
  "node": {
    "version": "v25.7.0",
    "env": "development"
  },
  "packageManager": {
    "name": "bun",
    "version": "1.2.23"
  },
  "frameworks": null,
  "databases": null,
  "betterAuth": {
    "version": "Unknown",
    "config": null
  }
}

Which area(s) are affected? (Select all that apply)

Backend, Other

Auth config (if applicable)

betterAuth({
    appName: '***',
    baseURL: ***,
    basePath: '/auth',
    database: drizzleAdapter(db, {
      provider: 'pg',
      usePlural: true,
    }),
    user: {
      ***
    },
    secret: ***,
    socialProviders: {
      apple: {
        clientId: ***,
        clientSecret: ***,
        appBundleIdentifier: ***,
        audience: [***],
      },
      google: {
        clientId: ***,
        clientSecret: ***,
      },
    },
    trustedOrigins: ['https://appleid.apple.com'],
    advanced: {
      database: {
        generateId: false,
      },
      cookiePrefix: '***',
      disableCSRFCheck: true,
      ipAddress: {
        ipAddressHeaders: [***],
      },
    },
    plugins: [
      bearer(),
      openAPI(),
      dash({
        apiKey: ***,
      }),
      admin({
        ac,
        roles: {
          ***
        },
      }),
      emailOTP({
        sendVerificationOTP: ***,
        otpLength: 6,
        storeOTP: 'hashed',
      }),
    ],
    telemetry: {
      enabled: false,
    },
  })

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    credentialsEmail/password, magic-link, OTP, phone, username, passkeysdevtoolsCLI, OpenAPI, telemetry, i18n, test-utils

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions