From bf2604086eafa851f0e8b6f02996ac180fc04d3a Mon Sep 17 00:00:00 2001 From: CrynogarTM Date: Fri, 5 Dec 2025 17:57:41 +0100 Subject: [PATCH] * Fix new gameforge login --- pkg/gameforge/gameforge.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/gameforge/gameforge.go b/pkg/gameforge/gameforge.go index fc96fc25..2e391d0a 100644 --- a/pkg/gameforge/gameforge.go +++ b/pkg/gameforge/gameforge.go @@ -6,12 +6,13 @@ import ( "encoding/json" "errors" "fmt" - "github.com/pquerna/otp/totp" "io" "net/http" "regexp" "strings" "time" + + "github.com/pquerna/otp/totp" ) // TokenCookieName gameforge cookie name for token id @@ -741,14 +742,14 @@ func postSessionsReq(params *loginParams, gameEnvironmentID, platformGameID stri Password string `json:"password"` Locale string `json:"locale"` GfLang string `json:"gfLang"` - PlatformGameID string `json:"platformGameId"` - Blackbox string `json:"blackbox"` + PlatformGameID string `json:"gameId"` GameEnvironmentID string `json:"gameEnvironmentId"` + Blackbox string `json:"blackbox"` AutoGameAccountCreation bool `json:"autoGameAccountCreation"` }{ Identity: username, Password: password, - Locale: "en_GB", + Locale: "en-GB", GfLang: "en", PlatformGameID: platformGameID, Blackbox: blackboxPrefix + blackbox, @@ -759,7 +760,7 @@ func postSessionsReq(params *loginParams, gameEnvironmentID, platformGameID stri if err != nil { return nil, err } - req, err := http.NewRequest(http.MethodPost, "https://gameforge.com/api/v1/auth/thin/sessions", bytes.NewReader(by)) + req, err := http.NewRequest(http.MethodPost, "https://spark-web.gameforge.com/api/v2/authProviders/mauth/sessions", bytes.NewReader(by)) if err != nil { return nil, err }