As you mentioned in your question, you can use this project hosted on github.
You can use the dependency
In the configuration class, you have to extend the SocialConfigurerAdapter, override the addConnectionFactories method and add the GoogleConnectionFactory. For instance:
@Configuration @EnableSocial public class SocialConfig extends SocialConfigurerAdapter { @Override public void addConnectionFactories(ConnectionFactoryConfigurer connectionFactoryConfigurer, Environment environment) { GoogleConnectionFactory googleConnectionFactory = new GoogleConnectionFactory(environment.getProperty("spring.social.google.app-id"), environment.getProperty("spring.social.google.app-secret")); googleConnectionFactory.setScope("https://www.googleapis.com/auth/plus.login"); connectionFactoryConfigurer.addConnectionFactory(googleConnectionFactory); } @Bean @Scope(value = "request", proxyMode = ScopedProxyMode.INTERFACES) public Google google(ConnectionRepository repository) { Connection<Google> connection = repository.findPrimaryConnection(Google.class); return connection != null ? connection.getApi() : null; } }
You can use this with Spring social examples.
source share