GOG GALAXY Encrypted App Tickets¶
The GOG GALAXY SDK provides access to Encrypted App Tickets, which can be used by a game for seamless GOG user authorization in any third-party backend.
Encrypted App Tickets are created and encrypted in the GOG GALAXY backend using a shared Private Key. The game can request the ticket for the current user, and the ticket can be passed to any third-party backend that also knows the Private Key and will be able to decrypt the data and thus confirm the user’s identity and their license for the game.
Retrieving an Encrypted Ticket From the Backend¶
Request the ticket using the
IUser::RequestEncryptedAppTicket()method of the GOG GALAXY SDK and provide any additional elements in its
dataparameter. By default, the following data is enclosed in the ticket:
timestamp of ticket generation.
The response to this call comes to
- If the request was successful (
OnEncryptedAppTicketRetrieveSuccess()), you can retrieve the ticket with the
Using the Ticket in a Third-Party Backend¶
App Tickets are encrypted using AES (Rijndael) with a 128-bit block size, 256-bit encryption key in the CBC mode. In our GitHub repository you will find a simple PHP library which decodes tickets — a reference PHP implementation is also available.