fix: sign In with Apple With ID Token not work (#966)

This commit is contained in:
Stephen Zhou
2024-12-20 21:27:43 +08:00
committed by GitHub
parent 5e84b35632
commit b4ff55d55a
2 changed files with 9 additions and 3 deletions

View File

@@ -25,10 +25,14 @@ description: Apple provider setup and usage.
apple: { // [!code highlight]
clientId: process.env.APPLE_CLIENT_ID as string, // [!code highlight]
clientSecret: process.env.APPLE_CLIENT_SECRET as string, // [!code highlight]
// Optional
appBundleIdentifier: process.env.APPLE_APP_BUNDLE_IDENTIFIER as string, // [!code highlight]
}, // [!code highlight]
},
})
```
On native iOS, it doesn't use the service id but the app id (bundle id) as client id, so if using the service id as clientId in signIn.social() with idToken, it throws an error: JWTClaimValidationFailed: unexpected "aud" claim value. So you need to provide the appBundleIdentifier when you want to sign in with Apple using the ID Token.
</Step>
</Steps>