get:
  summary: Authenticated using an OAuth provider
  description: Start OAuth flow using the specified provider
  tags:
    - Authentication
  operationId: oauthProvider
  parameters:
    - name: provider
      in: path
      description: Key of the activated OAuth provider.
      required: true
      schema:
        type: string
    - name: redirect
      in: query
      required: false
      description:
        Where to redirect on successful login.<br/>If set the authentication details are set inside cookies otherwise a
        JSON is returned.
      schema:
        type: string
  responses:
    '200':
      description: Successful request
      content:
        application/json:
          schema:
            type: object
            properties:
              public:
                type: boolean
              data:
                type: object
                properties:
                  token:
                    type: string
    '401':
      $ref: '../../openapi.yaml#/components/responses/UnauthorizedError'
