aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server')
-rw-r--r--src/main/java/com/juick/server/api/ApiSocialLogin.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/server/api/ApiSocialLogin.java
index 54a5d1bb..d6a103b4 100644
--- a/src/main/java/com/juick/server/api/ApiSocialLogin.java
+++ b/src/main/java/com/juick/server/api/ApiSocialLogin.java
@@ -54,6 +54,7 @@ import javax.annotation.PostConstruct;
import javax.inject.Inject;
import java.io.IOException;
import java.security.GeneralSecurityException;
+import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.UUID;
@@ -89,8 +90,8 @@ public class ApiSocialLogin {
private String VK_SECRET;
@Value("${telegram_token:secret}")
private String telegramToken;
- @Value("${google_client_ids:ids")
- private List<String> googleClientIds;
+ @Value("${google_client_id:}")
+ private String googleClientId;
@Inject
private CrosspostService crosspostService;
@@ -111,7 +112,7 @@ public class ApiSocialLogin {
twitterBuilder = new ServiceBuilder(twitterConsumerKey);
vkBuilder = new ServiceBuilder(VK_APPID);
verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory)
- .setAudience(googleClientIds)
+ .setAudience(Collections.singletonList(googleClientId))
.build();
}
@@ -293,7 +294,7 @@ public class ApiSocialLogin {
public IdToken.Payload googleSignIn(@RequestParam(name = "idToken") String idTokenString)
throws GeneralSecurityException, IOException {
logger.info("Token: {}", idTokenString);
- logger.info("Clients: {}", googleClientIds);
+ logger.info("Client: {}", googleClientId);
GoogleIdToken idToken = verifier.verify(idTokenString);
if (idToken != null) {
return idToken.getPayload();