interactiveAuth to add a token endpoint (/api/openapi-auth) plus a matching security scheme, so Scalar and Swagger UI show an Authorize dialog where users log in with their Payload credentials:
payload.config.ts
routes.api, /api by default):
payload.config.ts
How the login works
The endpoint logs in against your first auth-enabled collection, falling back tousers if none is found. It accepts the username as either email or username, matching how your auth collection is configured — the same value is passed as both, and Payload uses whichever login field the collection defines.
Request and response
The token endpoint accepts aPOST with form data (username and password fields) and returns the Payload JWT:
Request
Response (200)
400 with:
Response (400)
With
serve: false the interactive-auth endpoint is not mounted, along with the spec endpoint — see Static spec.