This repository was archived by the owner on Nov 20, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 406
No pem found for envelope (wrong 'kid' property match) #1418
Copy link
Copy link
Closed
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.
Description
| if (!Object.prototype.hasOwnProperty.call(certs, envelope.kid)) { |
My code looks like this:
const client = new OAuth2Client(
'CLIENT_ID_1'
);
const ticket = await client.verifyIdToken({
idToken: token,
audience: [
'CLIENT_ID_1',
'CLIENT_ID_2',
],
});
const payload = ticket.getPayload();
return payload.email;
It works well for my iOS and web Google Sign in implementations.
For the android one, it's failing, with error:
No pem found for envelope: {"alg":"RS256","kid":"6f8e1cb15641463c6df0f33394b03c92fcc889ac","typ":"JWT"}
The payload and envelope are separated correctly, it seems there is just the wrong 'kid' matching going on with the certs fetched from getFederatedSignonCertsAsync. How can I fix this?
And this is unlikely related to caching, as I had the same identical problem on local emulator, as well as a physical device, also have the same problem testing in the cloud. All freshly signed into a Google account without ever being signed into it.
irunika, Ekaanth, tmscarla and ByBogon
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.‘Nice-to-have’ improvement, new feature or different behavior or design.