betterAuth apple type error #740

Closed
opened 2026-03-13 08:02:15 -05:00 by GiteaMirror · 4 comments
Owner

Originally created by @reslear on GitHub (Feb 24, 2025).

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

Image

just add to backend:

    apple: {
      appBundleIdentifier: ''
    },

and get

Type '{ appBundleIdentifier: string; }' is missing the following properties from type 'Prettify<AppleOptions & { enabled?: boolean | undefined; }>': clientId, clientSecretts(2739)

Current vs. Expected behavior

Current:

    apple: {
      // ts errors
      clientId: '',
      clientSecret: '',
      appBundleIdentifier: ''
    },

Expected:

    apple: {
      appBundleIdentifier: ''
    },

What version of Better Auth are you using?

latest

Provide environment information

latest

Which area(s) are affected? (Select all that apply)

Backend

Auth config (if applicable)

import { betterAuth } from "better-auth"
export const auth = betterAuth({
  socialProviders: {
    apple: {
      appBundleIdentifier: ''
    },
  }
});

Additional context

No response

Originally created by @reslear on GitHub (Feb 24, 2025). ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce ![Image](https://github.com/user-attachments/assets/c9fab841-01ae-4309-9e60-df0ca08866ff) just add to backend: ``` apple: { appBundleIdentifier: '' }, ``` and get ``` Type '{ appBundleIdentifier: string; }' is missing the following properties from type 'Prettify<AppleOptions & { enabled?: boolean | undefined; }>': clientId, clientSecretts(2739) ``` ### Current vs. Expected behavior Current: ```ts apple: { // ts errors clientId: '', clientSecret: '', appBundleIdentifier: '' }, ``` Expected: ```ts apple: { appBundleIdentifier: '' }, ``` ### What version of Better Auth are you using? latest ### Provide environment information ```bash latest ``` ### Which area(s) are affected? (Select all that apply) Backend ### Auth config (if applicable) ```typescript import { betterAuth } from "better-auth" export const auth = betterAuth({ socialProviders: { apple: { appBundleIdentifier: '' }, } }); ``` ### Additional context _No response_
GiteaMirror added the bug label 2026-03-13 08:02:15 -05:00
Author
Owner

@theinfinit commented on GitHub (Feb 24, 2025):

According to the better-auth docs, Apple social provider requires clientId and clientSecret to work: https://www.better-auth.com/docs/authentication/apple

Sometimes, TypeScript errors might be hard to read, but that's exactly what the error says:

Type '{ appBundleIdentifier: string; }' is missing the following properties from type '...': clientId, clientSecretts(2739)

@theinfinit commented on GitHub (Feb 24, 2025): According to the `better-auth` docs, Apple social provider requires `clientId` and `clientSecret` to work: https://www.better-auth.com/docs/authentication/apple Sometimes, TypeScript errors might be hard to read, but that's exactly what the error says: Type '{ appBundleIdentifier: string; }' _**is missing the following properties**_ from type '...': _**clientId, clientSecretts(2739)**_
Author
Owner

@reslear commented on GitHub (Feb 24, 2025):

@theinfinit yup, i made an issue to fix it later. Ideally make these fields optional.

@reslear commented on GitHub (Feb 24, 2025): @theinfinit yup, i made an issue to fix it later. Ideally make these fields optional.
Author
Owner

@reslear commented on GitHub (May 21, 2025):

hi @Kinfe123 I think we should reopen because:

for IdToken no need clientId and clientSecret

83acedd634/packages/better-auth/src/social-providers/apple.ts (L104)

@reslear commented on GitHub (May 21, 2025): hi @Kinfe123 I think we should reopen because: for `IdToken` no need `clientId` and `clientSecret` https://github.com/better-auth/better-auth/blob/83acedd634e77bd302a9e7173064c94399862156/packages/better-auth/src/social-providers/apple.ts#L104
Author
Owner

@Tranthanh98 commented on GitHub (Dec 21, 2025):

Hey do I need to add CLIENT_ID and CLIENT_SECRET when using IdToken ???

@Tranthanh98 commented on GitHub (Dec 21, 2025): Hey do I need to add CLIENT_ID and CLIENT_SECRET when using IdToken ???
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#740