mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
specify multiple aud values when verifying google tokens
This commit is contained in:
parent
784bf8e8e7
commit
2a273ef504
1 changed files with 2 additions and 1 deletions
|
|
@ -59,6 +59,7 @@ export const validateGoogleUser = async (
|
|||
|
||||
const iosClientId = env.google.auth.iosClientId
|
||||
const webClientId = env.google.auth.clientId
|
||||
const androidClientId = env.google.auth.androidClientId
|
||||
|
||||
const googleWebClient = new OAuth2Client(webClientId)
|
||||
const googleIOSClient = new OAuth2Client(iosClientId)
|
||||
|
|
@ -72,7 +73,7 @@ export async function decodeGoogleToken(
|
|||
|
||||
const loginTicket = await googleMobileClient.verifyIdToken({
|
||||
idToken,
|
||||
audience: isAndroid ? env.google.auth.androidClientId : iosClientId,
|
||||
audience: [iosClientId, webClientId, androidClientId],
|
||||
})
|
||||
|
||||
const email = loginTicket.getPayload()?.email
|
||||
|
|
|
|||
Loading…
Reference in a new issue