Skip to content
This repository has been archived by the owner on Apr 5, 2019. It is now read-only.

Fix login with Facebook/Twitter #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.core.env.Environment;
import org.springframework.security.crypto.encrypt.TextEncryptor;
import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
import org.springframework.security.web.savedrequest.RequestCache;
import org.springframework.social.connect.Connection;
import org.springframework.social.connect.ConnectionFactory;
Expand Down Expand Up @@ -155,9 +156,10 @@ public ConnectController connectController(ProfilePictureService profilePictureS
* The Spring MVC Controller that coordinates "sign-in with {provider}" attempts.
* @param accountRepository the account repository that can load user Account objects given an account id.
*/
// @Bean
public ProviderSignInController providerSignInController(AccountRepository accountRepository, RequestCache requestCache) {
return new ProviderSignInController(connectionFactoryLocator(), usersConnectionRepository(), new AccountSignInAdapter(accountRepository, requestCache));
@Bean
public ProviderSignInController providerSignInController(AccountRepository accountRepository) {
RequestCache requestCache = new HttpSessionRequestCache();
return new ProviderSignInController(connectionFactoryLocator(), usersConnectionRepository(), new AccountSignInAdapter(accountRepository, requestCache));
}

}