swagger-api / swagger-api/swagger-ui
Oauth2.0 Implicit flow is not working
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
Q&A
- Browser: all
- Method of installation: Docker image
- Swagger-UI version: swaggerapi/swagger-ui:v3.43.0
- Swagger/OpenAPI version: OpenAPI 3.0.1
Content & configuration
Example Swagger/OpenAPI definition:
securitySchemes:
OAuth2:
type: oauth2
flows:
implicit:
authorizationUrl: https://oauthUrl/oauth2/authorize
refreshUrl: https://oauthUrl/oauth2/token
scopes: {}
Describe the bug you're encountering
When using Oauth2.0 Implicit flow, the authorization flow is carried properly and the Swagger UI shows that the user is authorized. However, if the user tries to make a request, the Swagger UI shows that the token is undefined and the request cannot be carried.
To reproduce...
Steps to reproduce the behavior:
- Press Authorize button
- Authorize via implicit flow
- Execute a request
Screenshots
Authorization seems to be OK...

... but really the token is not obtained

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
Start by reproducing the implicit-flow authorization with the provided Docker image and OpenAPI 3.0.1 definition, following the three listed steps. Trace how Swagger UI obtains and applies the token after authorization; the issue is done when the token is no longer undefined and is included in the executed request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript, openapi
- Domain
- api, frontend, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100