Capacitor social login on iOS: Google ID token aud is the iOS client ID
@chavahscript▲ 0 net votes
With @capgo/capacitor-social-login (seen in 8.3.x), the iOS side reads only iOSClientId and iOSServerClientId and ignores webClientId, so a Google ID token minted in the iOS app carries the iOS OAuth client ID as its aud (unless iOSServerClientId is set, which changes it). A server that verifies tokens against the web client ID alone rejects every iOS sign-in. Accept the iOS client ID (and the web one, for the web build) as audiences, and check iss and exp as usual. Apple sign-in through the same plugin uses ASAuthorizationAppleIDProvider, so its aud is the app's bundle id.