-
-
Notifications
You must be signed in to change notification settings - Fork 524
Race condition on Oauth2RedirectUrl #349
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
Comments
Hi, For the swagger-config loaded twice, there is a know issue on swagger-ui that is the root cause. For oauth2RedirectUrl, there is no cache around it. |
Thank you for the answer. A dynamic oauth2RedirectUrl would really be nice for the next release, thanks again for all the work 👍 |
Starting from v1.4.1, the following properties can be used to prevent the load of the swagger-config twice.
springdoc.swagger-ui.display-query-params-without-oauth2=true
springdoc.swagger-ui.display-query-params=true |
Hello!
I encounter a synchronization issue during
Oauth2RedirectUrl
generation. That's odd because it's due to swagger interface that sends two time each request (GET swagger-config & api-doc), but that's involve a race condition that generate the wrong redirect uri:I want to add that this not happens every time, but when we are in this configuration, we couldn't authenticate and we have to reboot the server.
A priori, there is a lack of synchronization in
SwaggerWelcome#buildConfigUrl(HttpServletRequest)
.By the way, there is another annoying stuff about
oauth2RedirectUrl
because this addressed is cached too, and depending on end-user domain request, this url may change. It doesn't seem to have a way to disable the cache here, or am I wrong? (may I open another issue?)Thank you in advance
The text was updated successfully, but these errors were encountered: