Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OAuth2/OIDC, authorization code flow, why does Swagger UI simulate a server? #10271

Open
maciejopalinski opened this issue Jan 31, 2025 · 1 comment

Comments

@maciejopalinski
Copy link

What was the use case when you implemented the OAuth2/OIDC functionality into Swagger UI? Because it does not seem to make any sense to me.

When I try to use authorization code flow, Swagger exchanges the code for the access token by itself, which is totally opposite of what a client application should do. In my understanding, authorization code flow gets the code from IdP and then sends the received code to the API that then exchanges the code for a token.

Why is Swagger UI trying to simulate both parties at the same time?

@maciejopalinski maciejopalinski changed the title OAuth2/OIDC, what is the use case? OAuth2/OIDC, authorization code flow, why does Swagger UI simulate a server? Jan 31, 2025
@maciejopalinski
Copy link
Author

According to your docs
https://swagger.io/docs/specification/v3_0/authentication/oauth2/

Authorization code – The most common flow, mostly used for server-side and mobile web applications. This flow is similar to how users sign up into a web application using their Facebook or Google account.

Authorization code is a server-side flow. Why does Swagger act like a server in this flow, when it is only supposed to act like a client?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant