You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, each time the user refreshes the Swagger UI or closes the browser, the authorization data, e.g. OAuth 2.0 tokens, is lost, which forces the user to re-authenticate to call APIs.
While one may argue that transient authorization data is more secure, it's not a great user experience. Many web applications persist short-lived tokens.
The persistAuthorization option to Swagger UI persists the authorization data in local storage, so it remains across browser close/refresh:
Use case
Currently, each time the user refreshes the Swagger UI or closes the browser, the authorization data, e.g. OAuth 2.0 tokens, is lost, which forces the user to re-authenticate to call APIs.
While one may argue that transient authorization data is more secure, it's not a great user experience. Many web applications persist short-lived tokens.
The
persistAuthorization
option to Swagger UI persists the authorization data in local storage, so it remains across browser close/refresh:https://swagger.io/docs/open-source-tools/swagger-ui/usage/configuration/#:~:text=persistAuthorization
Solution/User Experience
Provide an extra argument
persist_authorization
toenable_swagger()
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: