aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2019-12-23 13:39:08 +0300
committerGravatar Vitaly Takmazov2019-12-23 13:39:08 +0300
commit0456a0dcad430596cb058b65bfc3faae051d0b11 (patch)
treea6148992b2f395e414c880b3fae7d0c23b1a8df0 /src/main/java/com/juick
parent74cab5e7f3ea7ac37927bc792af012e595203e1d (diff)
Add return path to Social login API responses
Diffstat (limited to 'src/main/java/com/juick')
-rw-r--r--src/main/java/com/juick/server/api/ApiSocialLogin.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/server/api/ApiSocialLogin.java
index c24d1618..164c71a4 100644
--- a/src/main/java/com/juick/server/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/server/api/ApiSocialLogin.java
@@ -190,6 +190,7 @@ public class ApiSocialLogin {
}
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(redirectUrl);
uriComponentsBuilder.queryParam("hash", userService.getHashByUID(uid));
+ uriComponentsBuilder.queryParam("retpath", redirectUrl);
return "redirect:" + uriComponentsBuilder.build().toUriString();
} else {
if (!crosspostService.createFacebookUser(fbID, state, token.getAccessToken(), fb.getName())) {
@@ -240,6 +241,7 @@ public class ApiSocialLogin {
if (uid > 0) {
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(redirectUrl);
uriComponentsBuilder.queryParam("hash", userService.getHashByUID(uid));
+ uriComponentsBuilder.queryParam("retpath", redirectUrl);
return "redirect:" + uriComponentsBuilder.build().toUriString();
} else {
String loginhash = UUID.randomUUID().toString();
@@ -341,6 +343,7 @@ public class ApiSocialLogin {
}
UriComponentsBuilder uriComponentsBuilder = UriComponentsBuilder.fromUriString(redirectUrl);
uriComponentsBuilder.queryParam("hash", userService.getHashByUID(user.getUid()));
+ uriComponentsBuilder.queryParam("retpath", redirectUrl);
return "redirect:" + uriComponentsBuilder.build().toUriString();
} else {
String verificationCode = RandomStringUtils.randomAlphanumeric(8).toUpperCase();