Post

Replies

Boosts

Views

Activity

Reply to Sign In with Apple: AuthorizationError 1000, empty userInfo, delegate never receives authorization
Update: Found the root cause and fixed it, posting in case it helps anyone else hitting error 1000/1001 with Sign in with Apple on a Capacitor project. Root cause: My Xcode project (App.xcodeproj) was missing CODE_SIGN_ENTITLEMENTS in the build settings, and intermittently DEVELOPMENT_TEAM as well. Without the entitlements file properly linked, ASAuthorizationController had no valid presentation anchor, so the Apple sign-in sheet would fail silently or throw error 1000/1001. This was made trickier by two things: The community Capacitor Apple Sign In plugin doesn't implement ASAuthorizationControllerPresentationContextProviding out of the box, so I had to add a small Swift file (with an Objective-C bridging header) that explicitly provides the presentation anchor. Running npx cap sync wipes the entitlements/build settings each time, so the fix has to be reapplied after every sync (I ended up scripting this so I don't forget). Fix steps: Create an App.entitlements file with the Sign in with Apple capability enabled. In Xcode, under Signing & Capabilities, confirm the entitlements file is linked (CODE_SIGN_ENTITLEMENTS in Build Settings should point to it). Confirm DEVELOPMENT_TEAM is set correctly (this can silently reset too). Add a small class conforming to ASAuthorizationControllerPresentationContextProviding that returns your key window as the anchor, and wire it into the sign-in flow via a Swift/Obj-C bridge if you're using the community plugin. Re-verify all of the above after every cap sync, since sync regenerates the Xcode project and drops these settings. Once that was in place, Sign in with Apple worked end to end, verified via Supabase auth logs (auth.users / auth.identities). Hope this saves someone the days I spent on it.
1d
Reply to Sign In with Apple: AuthorizationError 1000, empty userInfo, delegate never receives authorization
Update: Found the root cause and fixed it, posting in case it helps anyone else hitting error 1000/1001 with Sign in with Apple on a Capacitor project. Root cause: My Xcode project (App.xcodeproj) was missing CODE_SIGN_ENTITLEMENTS in the build settings, and intermittently DEVELOPMENT_TEAM as well. Without the entitlements file properly linked, ASAuthorizationController had no valid presentation anchor, so the Apple sign-in sheet would fail silently or throw error 1000/1001. This was made trickier by two things: The community Capacitor Apple Sign In plugin doesn't implement ASAuthorizationControllerPresentationContextProviding out of the box, so I had to add a small Swift file (with an Objective-C bridging header) that explicitly provides the presentation anchor. Running npx cap sync wipes the entitlements/build settings each time, so the fix has to be reapplied after every sync (I ended up scripting this so I don't forget). Fix steps: Create an App.entitlements file with the Sign in with Apple capability enabled. In Xcode, under Signing & Capabilities, confirm the entitlements file is linked (CODE_SIGN_ENTITLEMENTS in Build Settings should point to it). Confirm DEVELOPMENT_TEAM is set correctly (this can silently reset too). Add a small class conforming to ASAuthorizationControllerPresentationContextProviding that returns your key window as the anchor, and wire it into the sign-in flow via a Swift/Obj-C bridge if you're using the community plugin. Re-verify all of the above after every cap sync, since sync regenerates the Xcode project and drops these settings. Once that was in place, Sign in with Apple worked end to end, verified via Supabase auth logs (auth.users / auth.identities). Hope this saves someone the days I spent on it.
Replies
Boosts
Views
Activity
1d