PHP
- PHP 8.2 or newer. The package uses constructor property promotion, readonly properties, and named arguments throughout.
opensslextension. Required to load the P-256.p8private key and sign the ES256 client-secret JWT. Bundled with every mainstream PHP build.jsonextension. Standard with PHP.
Laravel
- Laravel 10.x, 11.x, 12.x, or 13.x. The package requires
illuminate/supporton the matching major.
The service provider auto-registers via Laravel's package discovery.
Required ArtisanPack packages
artisanpack-ui/core^1.0 — pulled in transitively.artisanpack-ui/hooks^1.2 — the scope registry uses theap.apple-oauth.scopesfilter hook to collect scopes from service packages.
Optional peer packages
| Package | Version | What it enables |
|---|---|---|
artisanpack-ui/cms-framework |
any | The cms credential driver — stores credentials via the framework's Settings module (see cms driver). |
Not required. The base package boots and works without it; the cms driver throws a RuntimeException at construction time if you set APPLE_OAUTH_DRIVER=cms without the framework installed, so the misconfiguration is discoverable rather than silently broken.
Apple Developer
- Active Apple Developer Program membership. Sign in with Apple is not available on free accounts.
- An App ID with Sign in with Apple enabled, plus a Services ID and a Sign in with Apple
.p8key. See Apple Developer Setup.
HTTPS
- The
redirect_urimust be HTTPS. Apple refuses to registerhttp://return URLs on the Services ID. In development, use Laravel Herd's per-site TLS,valet secure, or a similar tool. endpoints.tokenmust be HTTPS.OAuthManagerandTokenManagerboth refuse to transmit theclient_secretover cleartext HTTP and throw an exception up front rather than sending the JWT in the clear.
Database
The package ships two tables:
apple_configurations(only used by thedatabasecredential driver, single-row upsert anchored on asingletonsentinel column)apple_connections(used by every driver — tokens always live in the database)
Any Laravel-supported connection works. If you migrate on a fresh install and later switch drivers, the unused table stays empty — leaving it in place is fine.
Encryption
The package uses Laravel's Encrypter (APP_KEY) to encrypt:
- The
private_keyandclient_secretcolumns when using thedatabaseorcmscredential drivers. - The
access_token,refresh_token, andid_tokencolumns on everyapple_connectionsrow, via Eloquent'sencryptedcast.
Rotating APP_KEY without re-encrypting the stored ciphertext will silently invalidate every stored credential ciphertext and every stored connection. The credential drivers log a warning and treat the row as unconfigured; the apple_connections cast will fail to decrypt, which surfaces as a DecryptException when the token manager runs. Plan a re-encryption pass alongside key rotations.
Session driver
The OAuth Flow uses the session to persist the CSRF state, id_token nonce, and app-side user id between the redirect to Apple and the callback. Any Laravel session driver works — cookie, file, database, redis. Just make sure sessions are enabled on the route group that handles your connect and callback routes (the default web middleware satisfies this).
SESSION_SAME_SITE must be lax (default) or none for OAuth redirects to include the session cookie. Since Apple form_posts back to your callback, SameSite=Strict will drop the session cookie and the state check will fail — see the FAQ entry on state mismatches.
Cache driver
ClientSecretGenerator caches minted client_secret JWTs in the default cache store. Any driver works. Cache misses simply mint a fresh JWT — there's no correctness issue if the cache is unavailable, only extra ES256 signing work per request.

