The GOG GALAXY SDK requires users to be authenticated in order to use online features such as Achievements, Multiplayer or Friends. It allows to do so by providing several authorization methods relying either on the GOG GALAXY Backend and GOG GALAXY Client, or on other services, e.g. Steam.
Additionally, you may use the GOG GALAXY SDK as an identity provider in your own services, relying on it to check user authentication and licenses for purchased games. More detailed information can be found in the next article, User Authentication Based On Other Services.
Before you start implementing desired authorization methods, please read about GOG GALAXY operational states and how they affect the GOG GALAXY SDK features.
When implementing the GOG GALAXY SDK features, you need to pay special attention to these two methods:
||Initializes the GOG GALAXY Peer with specified client (game) credentials. It succeeds when the GOG GALAXY client is installed and running. You need to call
||Allows to sign in the user based on the GOG GALAXY client authentication|
Based on their results, GOG GALAXY sets up two statuses:
|Status||Method to Check the Status||Description|
||Determines whether the user has a license for the game and is logged in to the GOG GALAXY client locally|
||Determines if the user has a license for the game, is logged in to the GOG GALAXY client and is connected to the GOG GALAXY Backend Services|
The table below shows how GOG GALAXY operational state depends on
Features Availability vs. Operational States¶
This table shows how GOG GALAXY features depend on GOG GALAXY operational states. Please note that if the
SignedIn() method returns
false, achievements, leaderboards, networking and matchmaking services should not be called.
Interfaces that can be called — if used — regardless of GOG GALAXY operational states are the
IApps (including the
IsDlcInstalled(ProductID productID) method) and the
IStorage interface methods (without the
FileShare() method). These can be called only after calling the
Init() method, but are not dependent on its result. This means that the
IApps and the
IStorage interfaces are available even if the
Init() call fails.
|Feature / Scenario||No GOG GALAXY or No User||GOG GALAXY: Installed and running, game known in the client but the user doesn’t own it||GOG GALAXY: Installed and running, game launched externally and the user has a license||GOG GALAXY: Installed and running, game launched in the client and the user has a license||GOG GALAXY: Installed and running, game launched offline, the user has a license||Other platforms (crossplay)|
|Game time tracking||✗||✗||✔︎||✔︎||✗||✗|
|DLC and language discovery||✔︎||✔︎||✔︎||✔︎||✔︎||✗|
|Cloud Storage — local storage||✔︎||✔︎||✔︎||✔︎||✔︎||✗|
|Cloud Storage — cloud sync||✗||✗||✔︎||✔︎||✗||✗|
*Overlay works in offline mode, but will not show any content requiring the internet connection.