3.0.3 • Published 1 year ago

@zakku/gf-login v3.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@zakku/gf-login

A node.js library for authenticating to GameFail's servers.

Prerequisites

For this library to work it is required to have openssl installed on your system.

Note: Versions prior to 2.0.0 doesn't require openssl but are bigger in size.

Installation

NPM:

npm install @zakku/gf-login

Yarn:

yarn add @zakku/gf-login

PNPM:

pnpm add @zakku/gf-login

Example Usage

import {
    getGameforgeClientVersion,
    CertificateStore,
    getAccountToken,
    getGameAccounts,
    getGameToken,
    convertNostaleToken
} from "@zakku/gf-login";

const installationId = "8cd369b7-3f73-47c4-bf57-3544201ec275";
const clientVersion = await getGameforgeClientVersion();
const certStore = await CertificateStore.create(
    "./cert.p12", 
    "secret_gf_cert_password"
);

const authToken = await getAccountToken(
    "gf-login@gameforge.sucks.af",
    "gfpls",
    installationId
);

const gameAccount = (await getGameAccounts(authToken, installationId))
    .find(acc => acc.accountName === "make_nostale_greate_again");

const gameToken = await getGameToken(
    authToken,
    gameAccount,
    installationId,
    clientVersion,
    certStore
);

const loginSession = convertNostaleToken(gameToken);

Credits

  • Special thanks to Xeno and Lank for the help in reverse engineering the User-Agent "magic" hash and a method for extracting the client's certificates.
3.0.3

1 year ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.0.2

3 years ago

1.1.0

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago