How to use spring social in a multi tenant application
I'm working on a multi tenant application where each of the customer's have their on url like abc.services.com and xyz.services.com.
Now I want to integrate Spring Social to this application for the purpose of Single Sign On and social application integration.
The problem we are facing is since we have to register the callback url with the service provider like Google, Facebook or Twitter are not able to complete the connect request since the client url and applications callback url registered with the provider are different.
I'm using the ConnectionController provided by Spring Social.
Ex: The user logs in to 'abc.services.com' and goes to the page and asks to connect to 'Google'. But the applications callback url is registered as 'social.services.com' in Google. When the user tries to initiate the connection the 'Google' provider will respond back to 'social.services.com' instead of 'abc.services.com' but this domain does not have a authenticated user, which will cause the request to fail.
Any help to resolve this issue will be highly appreciated.