Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions pkg/gameforge/gameforge.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand All @@ -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
}
Expand Down