GooglePlayGamesServicesAdapter

new GooglePlayGamesServicesAdapter(options)

Parse Server Configuration

To configure Parse Server for Google Play Games Services authentication, use the following structure:

{
  "auth": {
    "gpgames": {
      "clientId": "your-client-id",
      "clientSecret": "your-client-secret"
    }
  }
}

Insecure Configuration (Not Recommended)

{
  "auth": {
    "gpgames": {
      "enableInsecureAuth": true
    }
  }
}

The adapter requires the following authData fields:

  • Secure Authentication: code, redirect_uri.
  • Insecure Authentication (Not Recommended): id, access_token.

Auth Payloads

Secure Authentication Payload

{
  "gpgames": {
    "code": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
    "redirect_uri": "https://example.com/callback"
  }
}

Insecure Authentication Payload (Not Recommended)

{
  "gpgames": {
    "id": "123456789",
    "access_token": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  }
}

Notes

  • enableInsecureAuth is not recommended and may be removed in future versions. Use secure authentication with code and redirect_uri.
  • Secure authentication exchanges the code provided by the client for an access token using Google Play Games Services' OAuth API.
Parameters:
NameTypeDescription
optionsObject

The adapter configuration options.

Properties
NameTypeAttributesDefaultDescription
clientIdstring

Your Google Play Games Services App Client ID. Required for secure authentication.

clientSecretstring

Your Google Play Games Services App Client Secret. Required for secure authentication.

enableInsecureAuthboolean<optional>
false

[DEPRECATED] Enable insecure authentication (not recommended).