> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentarea.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Hydra Auth Redirect

> Redirect the browser to Hydra's actual /oauth2/auth endpoint.

Unlike the other OAuth2 endpoints which we proxy server-side, the auth
endpoint MUST be a browser redirect because Hydra sets session cookies
during the authorization flow.  If we proxy it, the cookies land on our
domain (localhost:8000) but Hydra's subsequent redirects go to its own
domain (localhost:4444), losing the cookies and breaking the flow.



## OpenAPI

````yaml /api-reference/openapi.json get /oauth2/auth
openapi: 3.1.0
info:
  description: >-
    Modular and extensible framework for building AI agents. This API requires
    JWT Bearer token authentication for most endpoints. Include your JWT token
    in the Authorization header. Public endpoints include /, /health, /docs,
    /redoc, and /openapi.json.
  title: AgentArea API
  version: 0.1.0
servers: []
security:
  - bearer: []
paths:
  /oauth2/auth:
    get:
      tags:
        - oauth-as
      summary: Hydra Auth Redirect
      description: |-
        Redirect the browser to Hydra's actual /oauth2/auth endpoint.

        Unlike the other OAuth2 endpoints which we proxy server-side, the auth
        endpoint MUST be a browser redirect because Hydra sets session cookies
        during the authorization flow.  If we proxy it, the cookies land on our
        domain (localhost:8000) but Hydra's subsequent redirects go to its own
        domain (localhost:4444), losing the cookies and breaking the flow.
      operationId: hydra_auth_redirect_oauth2_auth_get
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      bearerFormat: JWT
      description: JWT Bearer token for authentication
      scheme: bearer
      type: http

````