diff options
author | Vitaly Takmazov | 2018-09-07 15:51:07 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-09-07 15:51:07 +0300 |
commit | 6fc88562fbfdc3f66f9e6f4d96f0ad8199a50863 (patch) | |
tree | 99d29eaf03eee34972a06860439f181ca789905d /juick-server/src/main/java/com/juick/server | |
parent | 795fe65a5455e7422ce355bb4810cbda3e82dd53 (diff) |
Fix Facebook redirect
Diffstat (limited to 'juick-server/src/main/java/com/juick/server')
-rw-r--r-- | juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java b/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java index 014a728d..5f21e052 100644 --- a/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java +++ b/juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java @@ -111,6 +111,9 @@ public class SocialLogin { HttpServletResponse response) throws IOException, ExecutionException, InterruptedException { if (StringUtils.isBlank(code)) { String fbstate = UUID.randomUUID().toString(); + if (StringUtils.isBlank(state)) { + state = Utils.getPreviousPageByRequest(request).orElse("https://juick.com/"); + } crosspostService.addFacebookState(fbstate, state); OAuth20Service facebookAuthService = facebookBuilder .apiSecret(FACEBOOK_SECRET) |