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 Authorization Code flow, can't log in after log out #5172

Open
MykytaKryvenko opened this issue Feb 12, 2019 · 6 comments
Open

Oauth2 Authorization Code flow, can't log in after log out #5172

MykytaKryvenko opened this issue Feb 12, 2019 · 6 comments

Comments

@MykytaKryvenko
Copy link

MykytaKryvenko commented Feb 12, 2019

Q&A (please complete the following information)

  • OS: macOS
  • Browser: chrome, safari
  • Version: chrome 71.0, safari 11.1.2
  • Method of installation: dist assets
  • Swagger-UI version: 3.18.3
  • Swagger/OpenAPI version: OpenAPI 3.0

Describe the bug you're encountering

It seems that log out functionality does not flushes authorization code received after successful Oauth2 log in. When you log out and logging in again token request sent again with the same code, not with the new one.

To reproduce...

  1. Authorize with Oauth2 Authorization Code flow
  2. Press Log Out
  3. Try to authorize again

Expected behavior

You can successfully log out and authorize again with Authorization Code flow

@cgenin7
Copy link

cgenin7 commented Feb 27, 2019

I'm having the same issue. Also, if I reload the page after logging in, it shows as not logged in.

@shockey
Copy link
Contributor

shockey commented Apr 5, 2019

Yeah, seems like we should be flushing the data between logins.

if I reload the page after logging in, it shows as not logged in

@cgenin7 this is expected behavior, we don't store auth information between refreshes. Feel free to write a plugin that achieves this, Swagger Editor's local-storage is a good example of how to persist things in localStorage 😄

@shockey
Copy link
Contributor

shockey commented Apr 12, 2019

also see: #4904 and #4851.

@shockey
Copy link
Contributor

shockey commented May 16, 2019

#5316 might solve this, cc @leggsimon

@beatach
Copy link

beatach commented Feb 4, 2021

I am having the same issue. Looks like #5316 solves it for api_key authorization, but not for OAuth2.

@ecampoBilbomatica
Copy link

When logging out using authorization code with PKCE it keeps returning invalid_grant (seems to not be clearing the authorization code). Only working if closing the popup. Detailed in #6959.

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

No branches or pull requests

5 participants