Hello, currently after pressing the authorize button JWT token sent along with requests until a user refreshes a page.
After each page refresh user should authorize again.
I think it's a bug and _token should be saved in localStorage_ or sessionStorage (for security reasons).
But at least I want to have a checkbox "remember me" in authorization modal window so I can easily use just Swagger without any additional tools like Modheader.
Hi @oleksii-shnyra,
This is rather a feature request to the underlying swagger-ui-express library.
Same as in #73
Here's a workaround that I used: https://github.com/scottie1984/swagger-ui-express/issues/44#issuecomment-605088470
if anyone still need a simple solution:
SwaggerModule.setup('api', app, document, {
swaggerOptions: {
persistAuthorization: true,
},
});
if anyone still need a simple solution:
SwaggerModule.setup('api', app, document, { swaggerOptions: { persistAuthorization: true, }, });
Does this solution work for Swagger's BearerAuth, based on my testing this doesn't work.
if anyone still need a simple solution:
SwaggerModule.setup('api', app, document, { swaggerOptions: { persistAuthorization: true, }, });Does this solution work for Swagger's BearerAuth, based on my testing this doesn't work.
yep
@sagic Thanks. It works fine.
if anyone still need a simple solution:
SwaggerModule.setup('api', app, document, { swaggerOptions: { persistAuthorization: true, }, });Does this solution work for Swagger's BearerAuth, based on my testing this doesn't work.
Took my one reload to understand that it then works.
Most helpful comment
if anyone still need a simple solution: