aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java b/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java
index 522e9ab7..7be83748 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/SocialLogin.java
@@ -129,6 +129,7 @@ public class SocialLogin {
.apiKey(FACEBOOK_APPID)
.apiSecret(FACEBOOK_SECRET)
.callback(FACEBOOK_REDIRECT)
+ .scope("email")
.state(state)
.build(FacebookApi.instance());
OAuth2AccessToken token = facebookService.getAccessToken(code);
@@ -155,7 +156,7 @@ public class SocialLogin {
Cookie c = new Cookie("hash", userService.getHashByUID(uid));
c.setMaxAge(50 * 24 * 60 * 60);
response.addCookie(c);
- return Utils.getPreviousPageByRequest(request).orElse("redirect:/");
+ return "redirect:/";
} else if (fb.getVerified()) {
if (!crosspostService.createFacebookUser(fbID, state, token.getAccessToken(), fb.getName(), fb.getLink())) {
if (StringUtils.isNotEmpty(fb.getEmail())) {