mirror of
https://github.com/LukeHagar/better-auth.git
synced 2025-12-10 12:27:44 +00:00
fix: sign In with Apple With ID Token not work (#966)
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user