PropelAuth OAuth2 API

OAuth 2.0 / OpenID Connect identity-provider endpoints exposed by your PropelAuth Auth URL. Use PropelAuth as an OIDC provider for first-party and third-party OAuth clients, including no-code / low-code and OIDC-aware backends. Authorize, token exchange, refresh, userinfo, logout, and OIDC discovery.

OpenAPI Specification

propelauth-oauth2-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: PropelAuth End-User API Keys Access Tokens OAuth2 API
  description: 'Backend REST API for validating, issuing, listing, and revoking API keys that PropelAuth

    manages on behalf of your end users and tenant organizations. API keys can be scoped to a

    personal user, an organization, or imported from a legacy auth system. All endpoints

    require a PropelAuth Backend Integration API key.

    '
  version: 1.0.0
  contact:
    name: PropelAuth Support
    url: https://www.propelauth.com
    email: support@propelauth.com
  license:
    name: PropelAuth Terms
    url: https://www.propelauth.com/legal/terms-of-service
servers:
- url: https://{authId}.propelauthtest.com
  description: Test environment
  variables:
    authId:
      default: '0000000000'
- url: https://auth.example.com
  description: Production / Staging custom domain
security:
- BackendApiKey: []
tags:
- name: OAuth2
  description: Authorize, token, refresh, and userinfo endpoints
paths:
  /propelauth/oauth/authorize:
    get:
      summary: Authorize
      description: 'Redirect the user-agent to the PropelAuth login page. After successful login PropelAuth

        redirects back to your `redirect_uri` with a `code` parameter that you exchange at the

        token endpoint.

        '
      operationId: authorize
      tags:
      - OAuth2
      parameters:
      - name: response_type
        in: query
        required: true
        schema:
          type: string
          enum:
          - code
      - name: client_id
        in: query
        required: true
        schema:
          type: string
      - name: redirect_uri
        in: query
        required: true
        schema:
          type: string
          format: uri
      - name: scope
        in: query
        schema:
          type: string
      - name: state
        in: query
        schema:
          type: string
      - name: code_challenge
        in: query
        schema:
          type: string
      - name: code_challenge_method
        in: query
        schema:
          type: string
          enum:
          - S256
          - plain
      responses:
        '302':
          description: Redirect to login or to redirect_uri with authorization code
  /propelauth/oauth/token:
    post:
      summary: Token
      description: 'Exchange an authorization code for an access token and refresh token, or exchange an

        existing refresh token for a fresh access token.

        '
      operationId: token
      tags:
      - OAuth2
      requestBody:
        required: true
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
              - grant_type
              - client_id
              properties:
                grant_type:
                  type: string
                  enum:
                  - authorization_code
                  - refresh_token
                code:
                  type: string
                redirect_uri:
                  type: string
                  format: uri
                refresh_token:
                  type: string
                client_id:
                  type: string
                client_secret:
                  type: string
                code_verifier:
                  type: string
      responses:
        '200':
          description: Token issued
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  refresh_token:
                    type: string
                  id_token:
                    type: string
                  token_type:
                    type: string
                    example: Bearer
                  expires_in:
                    type: integer
                  scope:
                    type: string
  /propelauth/oauth/userinfo:
    get:
      summary: User Info
      description: Return the OIDC user info document for the bearer token.
      operationId: userInfo
      tags:
      - OAuth2
      security:
      - BearerAuth: []
      responses:
        '200':
          description: User info
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
  /api/backend/v1/logout:
    post:
      summary: Logout
      description: Invalidate the supplied refresh token. Backend-only.
      operationId: logout
      tags:
      - OAuth2
      security:
      - BackendApiKey: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - refresh_token
              properties:
                refresh_token:
                  type: string
      responses:
        '200':
          description: Token revoked
components:
  securitySchemes:
    BackendApiKey:
      type: http
      scheme: bearer