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
Hello Teams,
I'm using spring security oauth2 for single sign-on, and would like to use spring session to store oAuth2 information into Redis. so that we can scale horizontally. After debugging, I found spring security will not store scopedTarget.oauth2ClientContext into Redis by default, hence new instance will not able to get oAuth client information.
I found a similar issue on StackOverflow. but it's an old version. I'm currently using spring-security 5.2 and spring session 2.2. May I know can I achieve the same purpose in spring-security 5.2 in a reactive way(WebFlux)?
This is a major problem and no one must be using this in production with just Spring Security provided code. The problem is InMemoryReactiveOAuth2AuthorizedClientService is the only provided ReactiveOAuth2AuthorizedClientService.
I'm going to write one for Redis since this is blocking us as well.
Instead of configuring InMemoryReactiveOAuth2AuthorizedClientService use WebSessionServerOAuth2AuthorizedClientRepository along with Spring Session backed by Redis. That should work for your setup.
Hello Teams,
I'm using spring security oauth2 for single sign-on, and would like to use spring session to store oAuth2 information into Redis. so that we can scale horizontally. After debugging, I found spring security will not store scopedTarget.oauth2ClientContext into Redis by default, hence new instance will not able to get oAuth client information.
I found a similar issue on StackOverflow. but it's an old version. I'm currently using spring-security 5.2 and spring session 2.2. May I know can I achieve the same purpose in spring-security 5.2 in a reactive way(WebFlux)?
How to reproduce
A sample repo here: https://github.com/zhaojunjie163/sample.git
1.) Install Redis
2.) After authentication, if restart the application, then need to re-login, as scopedTarget.oauth2ClientContext not persist in Redis.
Configuration POM.xml
The text was updated successfully, but these errors were encountered: