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

Add Swagger UI persistAuthorization configuration parameter #3443

Closed
wants to merge 1 commit into from
Closed

Add Swagger UI persistAuthorization configuration parameter #3443

wants to merge 1 commit into from

Conversation

otsuka
Copy link

@otsuka otsuka commented Jul 1, 2021

When developing APIs that requires authentication using Swagger UI, if you reload the browser window of Swagger UI to reflect a change in the code, the authentication is lost and you have to log in again, which is troublesome.

Swagger UI has a persistAuthorization parameter that, if enabled, will persist the authentication and keep you logged in even if you reload or close the browser.
Swagger Documentation

In this PR, an argument swagger_ui_persist_auth is added to FastAPI constructor to set the persistAuthorization parameter. The default value is False, but setting this argument to True will also set the persistAuthorization parameter of Swagger UI to true.

@elrik75
Copy link

elrik75 commented Jul 6, 2021

I think the PR #2568 is more generic to give any parameters to swagger UI.

@RayBB
Copy link

RayBB commented Jan 18, 2022

@otsuka I think since #2568 is merged and released you can probably close this ticket!

@otsuka
Copy link
Author

otsuka commented Jan 18, 2022

@RayBB
Thank you for your comment. I closed the PR.

@otsuka otsuka closed this Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants