spring-attic / spring-social

Allows you to connect your applications with SaaS providers such as Facebook and Twitter.
http://projects.spring.io/spring-social
Apache License 2.0
619 stars 351 forks source link

cannot use ConnectController with JdbcConnectionRepository #225

Open enricjaen opened 7 years ago

enricjaen commented 7 years ago

Hello,

AFAIK, it's not possible to call "/connect/linkedin"and store the Connection in the JdbcConnectionRepository because there is still not Principal. And the Principal cannot be created without the Connection.

Shouldn't exist an interceptor between the Connection creation and the addConnection? This way it would be possible to create the Principal and then store Connection with userId the JdbcConnectionRepository

ConnectController.java: public RedirectView oauth2Callback(...) { Connection<?> connection = connectSupport.completeConnection(connectionFactory, request); // add interceptor here addConnection(connection, connectionFactory, request); }

What are your thoughts?

Regards Enric