nitro-apple-signin
Sign in with Apple for NitroUI apps. On iOS it calls Apple's AuthenticationServices directly, with no third-party SDK. It is a Nitro 1.0 module (nitro-core) with a Swift implementation for iOS and a Kotlin one for Android.
Apple has no native Sign in with Apple on Android: there AppleSignIn.isSupported() returns false and every other method rejects with NOT_SUPPORTED.
import { AppleSignIn } from 'nitro-apple-signin'
const credential = await AppleSignIn.signIn({ scopes: ['fullName', 'email'] })
What it does
| Capability | API | iOS | Android |
|---|---|---|---|
| Check availability | AppleSignIn.isSupported() | true | false |
| Show Apple's sheet | AppleSignIn.signIn(options?) | Yes | NOT_SUPPORTED |
| Check for revocation | AppleSignIn.getCredentialState(userId) | Yes | NOT_SUPPORTED |
| Read an error's code | getAppleSignInErrorCode(error) | Yes | Yes |
- Scopes for the user's
fullNameandemail. - A raw
nonce, hashed with SHA-256 before it goes to Apple, so the ID token can be tied to one request. - A
statevalue echoed back unchanged in the credential. - Cancelling the sheet resolves
undefinedinstead of rejecting. - Every failure carries a
[CODE]tag you can branch on.
The package ships no UI. The example app has a "Sign in with Apple" button styled to Apple's Human Interface Guidelines that you can copy: see Sign-in button.
Requirements
| Requirement | Version |
|---|---|
| NitroUI | 0.3.x (nitro-ui-renderer ^0.3.0) |
nitro-core (peer) | 1.0.0-alpha.nightly.137.gd4793c40b8b8, from NitroUI |
| iOS | 16 or newer |
| Apple Developer | An App ID with Sign in with Apple enabled |
Next steps
- Install the package.
- Set up iOS: the capability and the entitlement.
- Follow the quick start.