diff options
author | Vitaly Takmazov | 2017-04-09 21:17:09 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2017-04-09 21:17:09 +0300 |
commit | de785de9a48d00bdf2633c02b976be97ce8c8ddb (patch) | |
tree | 52ea146c7962c81089570dd46cfac661a1436cb6 /juick-www/src/main | |
parent | acc94b25c924d4963992927554c23c7027a512fd (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.java | 2 | ||||
-rw-r--r-- | juick-www/src/main/java/com/juick/www/controllers/VKontakteLogin.java | 2 |
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)) { |