cannot use ConnectController with JdbcConnectionRepository
enricjaen opened this issue · comments
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