Apple Sign In
Sign in with Apple uses a Services ID (web) and native identity tokens on iOS. Apple private relay addresses (@privaterelay.appleid.com) are valid registration emails. Native iOS tokens are verified against the App ID (APPLE_BUNDLE_ID) as well as the Services ID.
Apple Developer
Section titled “Apple Developer”- Enable Sign in with Apple on your App ID.
- Create a Services ID for web OAuth (redirect
{APP_URL}/auth/apple/callback). - Create a Sign in with Apple key (
.p8), note Key ID and Team ID. - Register email sending domains with Apple’s private email relay if you send mail to relay addresses.
API environment
Section titled “API environment”APPLE_CLIENT_ID=your.services.idAPPLE_CLIENT_SECRET=... # generated JWT or SocialiteProviders secretAPPLE_BUNDLE_ID=com.garrisonbible.app # iOS App ID / identity token audienceAPPLE_TEAM_ID=...APPLE_KEY_ID=...APPLE_PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\n..."APPLE_REDIRECT_URI=https://api.example.com/auth/apple/callbackThe API uses socialiteproviders/apple for the web redirect flow.
Web app
Section titled “Web app”When authMethods.apple is true:
- Login uses
intent=login— unknown Apple identities are not auto-registered. If Apple returns an email that already belongs to a Garrison account, that account is signed in and Apple is linked; otherwise users see “not connected” and can Register with Apple. - Register uses
intent=register→/register/complete(18+ and terms). Hide My Email relay is accepted asusers.email.
Profile → Connected accounts links or unlinks Apple without requiring matching emails.
Native AuthenticationServices returns an identity token verified by loginWithApple / registerWithApple GraphQL mutations. Set APPLE_BUNDLE_ID to the iOS App ID (bundle ID) so native tokens pass audience checks; web tokens still use the Services ID (APPLE_CLIENT_ID). Enable the Sign in with Apple capability on the iOS target (iosApp.entitlements). Unknown Apple identities do not create accounts on mobile — users must register on the web app first.
Sign in with Apple must appear with equal prominence to other social options on iOS (App Store Guideline 4.8).
Smoke test
Section titled “Smoke test”- Register with Apple on web → relay or real email →
/register/complete→ account created. - Login with unknown Apple → not linked message; Register continues the flow.
- Profile → link/unlink Apple (set password or keep another provider before unlink).