swagger-api / swagger-api/swagger-ui

Authorize after logout receives invalid_grant error

Open
#6,959 4 comments 1 reaction 0 assignees View on GitHub

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:

  1. Authorize
  2. Logout
  3. 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
2021-02-18_15h35_51

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.