Skip to content

API auth docs show obsolete session object for login response #248

@ncoprod

Description

@ncoprod

Bug

The REST API docs and OpenAPI spec describe POST /api/auth/login as returning tokens under session.access_token / session.refresh_token, but the route currently returns access_token and refresh_token at the top level.

This makes a client following the published docs read the wrong path and then send an invalid bearer token to authenticated endpoints.

Reproduction

  1. Call POST /api/auth/login with valid credentials.
  2. Compare the response shape with /docs/api or /api/openapi.json.
  3. The implementation returns top-level token fields, while the docs/spec still show a nested session object.

Expected

The docs and OpenAPI schema should match the current route response shape.

I have a small PR ready that updates the docs/spec and adds a route test assertion for the top-level token fields.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions