Skip to main content

Authentication

PrismCapabilities provides type-safe wrappers around Apple’s LocalAuthentication and AuthenticationServices frameworks. Authenticate users with biometrics or Apple ID without touching LAContext or ASAuthorizationController directly.

Biometric Auth

Face ID, Touch ID, and Optic ID with policy selection, error mapping, and device capability detection.

Sign in with Apple

Full Apple ID flow — authorization requests, credential handling, and revocation detection.

Biometric Authentication

Device Capability

Query which biometric type is available on the current device:
Check Biometric Type

Authentication Policies

Choose the level of fallback you want:

Authenticate

Biometric Authentication

Error Types

PrismBiometricError maps all common LAError codes:

Sign in with Apple

PrismSignInWithApple wraps ASAuthorizationController for Apple ID login:
Sign in with Apple
Store the userID from the credential — it’s stable across sessions. The email and name are only provided on the first authorization.

Credential State

Check if a previously authorized user is still valid:
Check Credential State