aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/www
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-09-07 15:51:07 +0300
committerGravatar Vitaly Takmazov2018-09-07 15:51:07 +0300
commit6fc88562fbfdc3f66f9e6f4d96f0ad8199a50863 (patch)
tree99d29eaf03eee34972a06860439f181ca789905d /juick-server/src/main/java/com/juick/server/www
parent795fe65a5455e7422ce355bb4810cbda3e82dd53 (diff)
Fix Facebook redirect
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/www')
-rw-r--r--juick-server/src/main/java/com/juick/server/www/controllers/SocialLogin.java3
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)