swagger-api / swagger-api/swagger-ui

Support multiple client_id values, per security definition

Open
#4,690 14 comments 74 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

cat: auth type: enhancement
Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

ui.initOAuth should support specifying configuration per-security definition. Specifically client_id and client_secret values.

My API has multiple security definitions available. But the Swagger UI has a different ClientID for each one (being that they are different providers). I am currently unable to use both without removing the client_id and specifying it manually in the textbox during authenticaiton.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the ui.initOAuth entry point and trace how client_id and client_secret are applied to security definitions during authentication. Check how Swagger UI represents multiple providers, then verify that each definition can retain distinct credentials and that existing single-provider behavior still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi
Domain
api, authentication, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.