mirror of
https://github.com/Sea-Haven-Industries/seahaven-ap.git
synced 2026-10-01 02:43:16 +00:00
Replace Bearer as the documented session path with Cognito hosted UI plus __Host-ap_* cookies so the SPA can call /api with credentials include.
41 lines
1.2 KiB
YAML
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
|