swagger-ui
swagger-ui copied to clipboard
Support multiple client_id values, per security definition
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.
+1
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
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.
bump. any updates on this?
Another bump, might make a PR for supporting this
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!
Has anybody found a workaround for this maybe? Struggling with this issue since we added a second auth flow to our API.
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.
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.
+1
+1