From 2ff5dbbc1cde2d16e77698bf56eae3edeb1a6538 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sun, 14 May 2023 00:45:01 -0400 Subject: [PATCH] Add call for Facebook logins --- .../server/http/dispatch/DispatchHandler.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/emu/grasscutter/server/http/dispatch/DispatchHandler.java b/src/main/java/emu/grasscutter/server/http/dispatch/DispatchHandler.java index 17b907117..35cc498e2 100644 --- a/src/main/java/emu/grasscutter/server/http/dispatch/DispatchHandler.java +++ b/src/main/java/emu/grasscutter/server/http/dispatch/DispatchHandler.java @@ -1,7 +1,5 @@ package emu.grasscutter.server.http.dispatch; -import static emu.grasscutter.utils.Language.translate; - import emu.grasscutter.Grasscutter; import emu.grasscutter.auth.AuthenticationSystem; import emu.grasscutter.auth.OAuthAuthenticator.ClientType; @@ -14,6 +12,8 @@ import emu.grasscutter.utils.JsonUtils; import io.javalin.Javalin; import io.javalin.http.Context; +import static emu.grasscutter.utils.Language.translate; + /** Handles requests related to authentication. (aka dispatch) */ public final class DispatchHandler implements Router { /** @@ -142,6 +142,13 @@ public final class DispatchHandler implements Router { Grasscutter.getAuthenticationSystem() .getOAuthAuthenticator() .handleTokenProcess(AuthenticationSystem.fromExternalRequest(ctx))); + javalin.get( + "/sdkFacebookLogin.html", + ctx -> + Grasscutter.getAuthenticationSystem() + .getOAuthAuthenticator() + .handleRedirection( + AuthenticationSystem.fromExternalRequest(ctx), ClientType.DESKTOP)); javalin.get( "/Api/twitter_login", ctx ->