Sign in with Apple
for NitroUI apps
Apple's AuthenticationServices on iOS, with no third-party SDK. Typed credentials, hashed nonces and tagged errors, and a clean NOT_SUPPORTED on Android.
bun add nitro-apple-signinThree methods, nothing extra
Sign in, check the credential, read the error. The whole surface fits on one page.
Apple's native sheet
AuthenticationServices on iOS. Cancelling resolves undefined, not an error.
Catch revoked users
Check the stored user ID at launch and sign out revoked or unknown users.
Hashed nonce
Pass the raw value; Apple gets its hash. Ready for Firebase and Supabase.
Tagged errors
Every native failure carries a [CODE] tag you can switch on.
Built for real sign-in flows
The details Apple leaves to you, handled in the module or documented here.
No third-party SDK
Swift on top of Apple's AuthenticationServices and CryptoKit.
Name and email
fullName and email scopes, delivered on the first sign-in.
Backend-ready tokens
Identity token, single-use authorization code and stable user ID.
Request state
An opaque state value comes back unchanged in the credential.
One at a time
A second sign-in while the sheet shows rejects with IN_PROGRESS.
Clear failures
SIGN_IN_FAILED messages include the ASAuthorizationError number.
Safe on Android
isSupported() is false; other calls reject with NOT_SUPPORTED.
HIG button to copy
The example ships a Sign in with Apple button in three styles.
A few lines per flow
Sign in, check the credential at launch, and branch on typed error codes.
Read the guidesimport { AppleSignIn } from 'nitro-apple-signin'
if (AppleSignIn.isSupported()) {
const credential = await AppleSignIn.signIn({
scopes: ['fullName', 'email'],
nonce: rawNonce,
})
if (credential !== undefined) {
// Email and name arrive only on the first sign-in.
await sendToBackend(credential.identityToken, credential.email)
saveUserId(credential.user)
}
}
Add Sign in with Apple today
Enable the capability, add one entitlement, call signIn.