seahaven-ap/packages/api/openapi/paths/auth-login.yaml
Adam Moussa bbfa6e4a3c
feat(api): switch live auth to host cookie BFF
Replace Bearer as the documented session path with Cognito hosted UI plus __Host-ap_* cookies so the SPA can call /api with credentials include.
2026-09-22 12:39:00 -04:00

41 lines
1.2 KiB
YAML

get:
tags:
- Session
summary: Start hosted UI sign-in
description: Redirects the browser to Cognito hosted UI with PKCE S256. Sets the oauth cookie.
operationId: get-api-auth-login
security: []
parameters:
- name: returnTo
in: query
required: false
description: Relative path to return to after sign-in.
schema:
type: string
default: /
example: /invoices
responses:
"302":
description: Redirect to Cognito hosted UI.
"400":
description: Bad request.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error:
code: VALIDATION_ERROR
message: Bad request.
correlationId: 11111111-1111-4111-8111-111111111111
"500":
description: Cognito is not configured.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error:
code: INTERNAL_ERROR
message: Cognito is not configured.
correlationId: 11111111-1111-4111-8111-111111111111