swagger-api / swagger-api/swagger-ui
Authorize after logout receives invalid_grant error
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 29k
- Forks
- 9.3k
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 25
Description
- OS: Windows 10
- Browser: Firefox
- Version: 85.0.2
- Method of installation: npm
- Swagger-UI version: 3.43.0
- Swagger/OpenAPI version: Swagger 2.0
When logging out after a successful logging, if the dialog window is not closed I receive a invalid_grant error from the server. It appears that the code is not being reset after logging out. The payload of the request seems to be the same
Steps to reproduce the behavior:
- Authorize
- Logout
- Try to authorize again without closing the dialog
Expected behavior
The API logging completes without error if the dialog is not closed.
Screenshots
The first code accepted

The second code is not changed if the popup is not closed

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 authorize, logout, and reauthorize sequence in Swagger UI 3.43.0 with Swagger 2.0, keeping the dialog open. Start by tracing the authorization dialog's logout and code-reset handling; the issue is done when a second authorization receives a fresh code and completes without an invalid_grant error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100