mirror of
https://github.com/better-auth/better-auth.git
synced 2026-05-26 08:56:40 -05:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user