mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-09 03:22:52 +08:00
Add call for Facebook logins
This commit is contained in:
parent
418422577a
commit
2ff5dbbc1c
@ -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 ->
|
||||
|
Loading…
Reference in New Issue
Block a user