Skip to main content

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​

CapabilityAPIiOSAndroid
Check availabilityAppleSignIn.isSupported()truefalse
Show Apple's sheetAppleSignIn.signIn(options?)YesNOT_SUPPORTED
Check for revocationAppleSignIn.getCredentialState(userId)YesNOT_SUPPORTED
Read an error's codegetAppleSignInErrorCode(error)YesYes
  • Scopes for the user's fullName and email.
  • A raw nonce, hashed with SHA-256 before it goes to Apple, so the ID token can be tied to one request.
  • A state value echoed back unchanged in the credential.
  • Cancelling the sheet resolves undefined instead 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​

RequirementVersion
NitroUI0.3.x (nitro-ui-renderer ^0.3.0)
nitro-core (peer)1.0.0-alpha.nightly.137.gd4793c40b8b8, from NitroUI
iOS16 or newer
Apple DeveloperAn App ID with Sign in with Apple enabled

Next steps​

  1. Install the package.
  2. Set up iOS: the capability and the entitlement.
  3. Follow the quick start.