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

# Create custom OAuth configuration

> Create a new custom OAuth provider configuration (admin only)



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/auth.yaml post /api/auth/oauth/custom/configs
openapi: 3.0.3
info:
  title: Insforge Authentication API
  version: 2.0.0
  description: Authentication endpoints with separated auth and profile tables
servers: []
security: []
paths:
  /api/auth/oauth/custom/configs:
    post:
      tags:
        - Admin
      summary: Create custom OAuth configuration
      description: Create a new custom OAuth provider configuration (admin only)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - key
                - name
                - discoveryEndpoint
                - clientId
                - clientSecret
              properties:
                key:
                  type: string
                name:
                  type: string
                discoveryEndpoint:
                  type: string
                  format: uri
                clientId:
                  type: string
                clientSecret:
                  type: string
      responses:
        '200':
          description: Custom OAuth configuration created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomOAuthConfig'
        '400':
          description: Invalid request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden - Admin only
        '409':
          description: Configuration already exists
      security:
        - bearerAuth: []
components:
  schemas:
    CustomOAuthConfig:
      type: object
      properties:
        id:
          type: string
          format: uuid
        key:
          type: string
        name:
          type: string
        discoveryEndpoint:
          type: string
          format: uri
        clientId:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````