Auth0 Home Blog Docs

Auth0 + OpenAPI 3.0

Has anyone been able to create an OpenAPI 3.0 specification that is able to request a token from Auth0? I am running a local Swagger Editor https://github.com/swagger-api/swagger-editor.

What callback must I register with my Auth0 application? http://localhost:3001/oauth2-redirect.html

openapi: 3.0.0
info:
  version: 0.0.1
  title: My API 

servers:
  - url: '{protocol}://localhost:8081/{basePath}'
    description: My API locally hosted release
    variables:
      protocol:
        description: Protocol
        enum:
          - 'https'
          - 'http'
        default: 'https'
      basePath:
        description: Base path
        enum:
          - 'api/v1'
        default: 'api/v1'

components:
  securitySchemes:
    auth0:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: 'https://dev-0000-x000.auth0.com/oauth/authorize'
          tokenUrl: 'https://dev-0000-x000.auth0.com/oauth/token'
          scopes:
            {}

security: 
  - auth0: []

paths:
  /companies:
    get:
      description: Returns a list of companies              
      responses:
        '200':
          description: Successful response

It would be fantastic if a quickstart article was written showing how to hook up a Swagger UI/Editor with Auth0 authentication.

Hey there @dak2009!

Relaying the feedback just now to appropriate team to have that content created some time soon!