Closed tkoval83 closed 1 week ago
Hi @tkoval83, thanks for reaching out.
You mention:
I am using WebClient configuration for OAuth2. Application itself is NOT reactive.
yet your configuration is using all reactive components which is not intended. Please see core interfaces and classes and WebClient integration for servlet applications in the docs.
Only single request to token endpoint should be made.
It's not clear from your issue whether you're referring to (1) the framework making two calls to the token endpoint in response to a single request to the application, or (2) something else. If (1), please provide a minimal, reproducible sample or an integration test that reproduces the issue.
If you're referring to multiple requests to the application, I don't feel that the expectation of a single atomic request to the token endpoint is reasonable for the framework out of the box. Please see discussions on this in gh-11461 and gh-14123, including suggestions for how to address this in this and this comment.
Please consider providing a minimal reproducible example and more details if you believe this is a bug in the framework. Otherwise I plan to close this issue.
@tkoval83 as I mentioned, your configuration is incorrect. Please use components from the servlet documentation to configure your application and provide a minimal sample. As part of the minimal sample, I’d ask that you remove as many of the customizations as you are able, while still reproducing the problem.
@tkoval83 thank you for providing such a detailed sample, it is quite impressive. Unfortunately, the sample is not minimal and includes extra dependencies, configuration and modules. I'm going to close this issue. If you would like us to look further at this issue, please take some time to simplify the sample so that only the minimal dependencies, configuration and a single module are required.
Describe the bug When token expires_in is less then 62 seconds two requests are made instead of 1.
To Reproduce In token response for client_credentials set expires_in to less then 62.
Expected behavior Only single request to token endpoint should be made.
Sample
I am using WebClient configuration for OAuth2. Application itself is NOT reactive.