GoogleAdapter

new GoogleAdapter(options)

Parse Server Configuration

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

{
  "auth": {
    "google": {
      "clientId": "your-client-id"
    }
  }
}

The adapter requires the following authData fields:

  • id: The Google user ID.
  • id_token: The Google ID token.

Auth Payload

Example Auth Data Payload

{
  "google": {
    "id": "1234567",
    "id_token": "xxxxx.yyyyy.zzzzz"
  }
}

Notes

  • Ensure your Google Client ID is configured properly in the Parse Server configuration.
  • The id_token is validated against Google's authentication services.
Parameters:
NameTypeDescription
optionsObject

The adapter configuration options.

Properties
NameTypeAttributesDescription
clientIdstring

Your Google application Client ID.

cacheMaxEntriesnumber<optional>

Maximum number of JWKS cache entries. Default: 5.

cacheMaxAgenumber<optional>

Maximum age of JWKS cache entries in ms. Default: 3600000 (1 hour).