function getGoogleKeyByKeyId(keyId) {
  if (cache[keyId] && cache.expiresAt > new Date()) {
    return cache[keyId];
  }

  return new Promise((resolve, reject) => {
    https
      .get(`https://www.googleapis.com/oauth2/v3/certs`, res => {
        let data = '';
        res.on('data', chunk => {
          data += chunk.toString('utf8');
        });
        res.on('end', () => {
          const { keys } = JSON.parse(data);
          const pems = keys.reduce(
            (pems, { n: modulus, e: exposant, kid }) =>
              Object.assign(pems, {
                [kid]: rsaPublicKeyToPEM(modulus, exposant),
              }),
            {}
          );

          if (res.headers['cache-control']) {
            var expire = res.headers['cache-control'].match(/max-age=([0-9]+)/);

            if (expire) {
              cache = Object.assign({}, pems, {
                expiresAt: new Date(new Date().getTime() + Number(expire[1]) * 1000),
              });
            }
          }

          resolve(pems[keyId]);
        });
      })
      .on('error', reject);
  });
}
Parse Server authentication adapter for Google.

@class GoogleAdapter
@param {Object} options - The adapter configuration options.
@param {string} options.clientId - Your Google application Client ID. Required for authentication.

@description
## Parse Server Configuration
To configure Parse Server for Google authentication, use the following structure:
```json
{
  "auth": {
    "google": {
      "clientId": "your-client-id"
    }
  }
}
```

The adapter requires the following `authData` fields:
- **id**: The Google user ID.
- **id_token**: The Google ID token.
- **access_token**: The Google access token.

## Auth Payload
### Example Auth Data Payload
```json
{
  "google": {
    "id": "1234567",
    "id_token": "xxxxx.yyyyy.zzzzz",
    "access_token": "abc123def456ghi789"
  }
}
```

## Notes
- Ensure your Google Client ID is configured properly in the Parse Server configuration.
- The `id_token` and `access_token` are validated against Google's authentication services.

@see {@link https://developers.google.com/identity/sign-in/web/backend-auth Google Authentication Documentation}