Skip to content

Provides a reliable API for authenticating GD accounts

Notifications You must be signed in to change notification settings

FireMario211/GDAuth

 
 

Repository files navigation

GDAuth

the mod's logo

Usage

To get a token, use the getAuthenticationToken method.

authentication::AuthenticationManager::get()->getAuthenticationToken([](std::string token) {
    log::info("{}", token);
});

Then, you can validate the token with a request to https://gd.figm.io/authentication/validate, passing in the token as the sessionID parameter. Tokens expire after 24 hours. A token is only valid if the user has valid credentials to log into their account. An example response to a validation request is listed below:

{
    "_id": "66bd6141575934ecdee278c2",
    "sessionID": "a90fa1eb-7e44-47c1-8301-7c6f7101b08a",
    "accountID": 107269,
    "username": "FigmentBoy",
    "expires_after": "2024-08-16T02:00:33.488Z"
}

About

Provides a reliable API for authenticating GD accounts

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 52.0%
  • C++ 33.2%
  • CMake 14.8%