swagger-ui icon indicating copy to clipboard operation
swagger-ui copied to clipboard

Support multiple client_id values, per security definition

Open wasabii opened this issue 6 years ago • 8 comments

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.

wasabii avatar Jul 03 '18 14:07 wasabii

+1

patricknolan avatar Oct 04 '18 21:10 patricknolan

same here I am trying to use swagger to access my API which supports several Auth Providers and client_id for swagger application is different currently there is no way to specify separate client_id for each auth provider

stas-sultanov avatar Oct 19 '18 14:10 stas-sultanov

Me too! I have one security definition for my oauth2 setup, which accepts all 4 oauth 2 grant types/flows. However, each flow has a differently configured client! It would be good if the initialisation function take both which definition you are referring to, and if an oauth 2 type, which flow we were talking about.

delboy1978uk avatar Nov 29 '18 19:11 delboy1978uk

bump. any updates on this?

mrcunninghamz avatar May 10 '19 16:05 mrcunninghamz

Another bump, might make a PR for supporting this

arynaq avatar Sep 19 '19 07:09 arynaq

Folks: per the Swagger Contribution Guide, please refrain from making comments that only serve to bump the issue or indicate interest — use Reactions to vote for issues instead. Thanks!

shockey avatar Sep 28 '19 05:09 shockey

Has anybody found a workaround for this maybe? Struggling with this issue since we added a second auth flow to our API.

maximiliancsuk avatar Dec 17 '20 09:12 maximiliancsuk

Here is btw. kind of a duplicate to it: https://github.com/swagger-api/swagger-ui/issues/4087 Someone started working on it, but it looks like it was never finished.

I'm actually wondering, that this did not get more feedback already. It's such a common usecase, when different public (or internal) auth providers like Google, Microsoft, Facebook are accepted.

We even have legacy flows which do not need a client_id at all and the UI always sends the one which is setup globally.

pfeigl avatar Aug 16 '22 15:08 pfeigl

Folks: per the Swagger Contribution Guide, please refrain from making comments that only serve to bump the issue or indicate interest — use Reactions to vote for issues instead. Thanks!

I suppose the nice thing from a users point of view with "+1" comment is that you automatically get subscribed to the thread that you're interested in, a lot of people have probably added a reaction emoji and never get any more updates.

Anyone interested in this, may want to click the "Subscribe" button to the right.

broomfn avatar Jan 12 '23 14:01 broomfn

+1

tihobrazov avatar Jan 30 '23 13:01 tihobrazov

+1

JayAhn2 avatar Feb 09 '23 16:02 JayAhn2