aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-04-09 21:17:09 +0300
committerGravatar Vitaly Takmazov2017-04-09 21:17:09 +0300
commitde785de9a48d00bdf2633c02b976be97ce8c8ddb (patch)
tree52ea146c7962c81089570dd46cfac661a1436cb6 /juick-www/src/main
parentacc94b25c924d4963992927554c23c7027a512fd (diff)
fix fb and vk redirect
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java2
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
index e83bab92..e136af9b 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/FacebookLogin.java
@@ -130,7 +130,7 @@ public class FacebookLogin {
Cookie c = new Cookie("hash", userService.getHashByUID(uid));
c.setMaxAge(50 * 24 * 60 * 60);
response.addCookie(c);
- return Utils.getPreviousPageByRequest(request).orElse("/");
+ return Utils.getPreviousPageByRequest(request).orElse("redirect:/");
} else if (fb.getVerified()) {
String loginhash = UUID.randomUUID().toString();
if (!crosspostService.createFacebookUser(fbID, loginhash, token.getAccessToken(), fb.getName(), fb.getLink())) {
diff --git a/juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java b/juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java
index 12f90388..bc2ff719 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java
@@ -126,7 +126,7 @@ public class VKontakteLogin {
Cookie c = new Cookie("hash", userService.getHashByUID(uid));
c.setMaxAge(50 * 24 * 60 * 60);
response.addCookie(c);
- return Utils.getPreviousPageByRequest(request).orElse("/");
+ return Utils.getPreviousPageByRequest(request).orElse("redirect:/");
} else {
String loginhash = UUID.randomUUID().toString();
if (!crosspostService.createVKUser(vkID, loginhash, token.getAccessToken(), vkName, vkLink)) {