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

Authorization value is lost on refresh #4851

Closed
Vanuan opened this issue Sep 6, 2018 · 5 comments · Fixed by #5939
Closed

Authorization value is lost on refresh #4851

Vanuan opened this issue Sep 6, 2018 · 5 comments · Fixed by #5939

Comments

@Vanuan
Copy link

Vanuan commented Sep 6, 2018

Q&A (please complete the following information)

  • OS: Ubuntu
  • Browser: Chrome
  • Version: 68
  • Method of installation: docker hub
  • Swagger-UI version: 3.18.2
  • Swagger/OpenAPI version: OpenAPI 3.0

Content & configuration

Example Swagger/OpenAPI definition:

components:
  securitySchemes:
    x-api-token:
      type: apiKey
      name: x-api-token
      in: header
  links: {}
  callbacks: {}
security:
  - x-api-token: []

Describe the bug you're encountering

Authorization value is lost on refresh

To reproduce...

Steps to reproduce the behavior:

  1. Click on 'Authorize'
  2. Enter value
  3. Press 'Authorize'
  4. Refresh the page
  5. Click 'Authorize' again

Expected behavior

I should see "Value: ******"

Screenshots

screenshot from 2018-09-06 06-26-58
screenshot from 2018-09-06 06-27-47

Additional context or thoughts

I thought that's the whole purpose of authorize button - to save user session so that it's not lost on refresh

@Vanuan
Copy link
Author

Vanuan commented Sep 6, 2018

Should be easily fixable using solution like this: https://github.com/rt2zz/redux-persist

@vzaytsev
Copy link

vzaytsev commented Sep 6, 2018

+++

@Vanuan
Copy link
Author

Vanuan commented Sep 11, 2018

Pushed fixed version to docker hub: vanuan/swagger-ui:persist-authorization

@hanut
Copy link

hanut commented Dec 4, 2019

Is this going to be merged anytime soon ?
It is pretty troublesome to put the authentication part in every time you refresh the UI.

@cognifloyd
Copy link

#5939 implements this and includes a feature flag (disabled by default).
I hope SmartBear folks will take a look soon!

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