Sign in with Apple
This guide will teach you how to add native Sign in with Apple to your Clerk apps on Apple platforms.
Add your Native Application
Add your iOS application to the Native applications page in the Clerk Dashboard. You will need your iOS app's App ID Prefix and Bundle ID.
Enable Apple as a social connection
- In the Clerk Dashboard, navigate to the SSO connections page.
- Select Add connection and select For all users.
- Select Apple from the provider list.
- Ensure that Enable for sign-up and sign-in is toggled on.
Build your sign-in flow
Use clerk.auth.signInWithApple() to start the native Sign in with Apple flow:
try await clerk.auth.signInWithApple()Troubleshooting
I’m not receiving the user’s first and last name from Apple
Apple only provides fullName the very first time a user authorizes your app with Sign in with Apple. On subsequent sign-ins (or if the user already authorized your app in the past), Apple does not resend the name.
If you expected a name and didn’t receive one, check the following:
- First-time authorization only: If this isn’t the user’s first authorization for this app, Apple will not return
fullName. You should store the name the first time you receive it and treat it as optional after that. Deleting the user from Clerk does not reset this on Apple’s side. - Requested scopes: Make sure your Sign in with Apple request includes the
fullNamescope (andemail, if you need it). IffullNamewasn’t requested, Apple won’t prompt the user to share it. - User denied name sharing: If the user chooses not to share their name, Apple won’t provide it. Make sure your UI can collect a name as a fallback.
To test the first-time flow again, delete the user from Clerk, revoke the app’s authorization in iOS (Settings → Apple ID → Sign in with Apple → your app → Delete), and sign in again.
Feedback
Last updated on
Edit on GitHub