Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use multiple Oauth2 SSO Servers on a single Spring boot application with Spring Cloud Security Oauth2?

I'd like to give users the option to login to a Spring Boot web application using their Google or Facebook account.

I checked The Spring Cloud Security documentation and also This GitHub issue to add such SSO functionality, but on both they only show how to configure one SSO server, so it's either Google or Facebook.

How can I add both options? on the web front-end I will add a button for each option so the users can choose which account to use, either Google or Facebook.

Or I am choosing the wrong package and should use something different altogether to achieve this?

Thanks!

like image 367
Raul G Avatar asked Jan 02 '16 15:01

Raul G


1 Answers

You basically have to install a separate authentication filter for each provider. There's a tutorial here: https://spring.io/guides/tutorials/spring-boot-oauth2/.

like image 85
Dave Syer Avatar answered Nov 16 '22 02:11

Dave Syer