fix: google IdToken auth issuer mismatch (#1351)

"The value of iss in the ID token is equal to accounts.google.com or https://accounts.google.com."

Source: https://developers.google.com/identity/gsi/web/guides/verify-google-id-token
This commit is contained in:
Anton Begehr
2025-02-04 19:30:13 +07:00
committed by GitHub
parent 51a1a0ad1f
commit e83c0ff2b4

View File

@@ -105,7 +105,8 @@ export const google = (options: GoogleOptions) => {
}
const isValid =
tokenInfo.aud === options.clientId &&
tokenInfo.iss === "https://accounts.google.com";
(tokenInfo.iss === "https://accounts.google.com" ||
tokenInfo.iss === "accounts.google.com");
return isValid;
},
async getUserInfo(token) {