swagger-api / swagger-api/swagger-ui
OAuth 2 with authorization code flow uses wrong callback url
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A (please complete the following information)
- OS: macOS
- Browser: chrome
- Version: 67
- Method of installation: none
- Swagger-UI version: current online version
- Swagger/OpenAPI version: both Swagger 2.0 and OpenAPI 3.0
Describe the bug you're encountering
We have OAuth2 authorization code flow implemented. Our API documentation is build using OpenAPI v3. Using https://editor.swagger.io/ does not work for us, because there is a bug with the callback url.
Swagger Editor should either provide means to change the callback url required or should at least get it right.
Expected: https://editor.swagger.io/oauth2-redirect.html
Actual: http://localhost:3200/oauth2-redirect.html
Expected behavior
Using OAuth2 with authorization code flow should work while using https://editor.swagger.io/.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the OAuth 2 authorization-code flow in the online Swagger Editor and trace how the callback URL is selected. Compare the generated URL with the expected https://editor.swagger.io/oauth2-redirect.html; done means authorization uses that HTTPS callback and works for the reported OpenAPI 3 setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, openapi
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100