{"manifest":{"id":"apple","name":"Apple Sign In / OAuth","description":"Stateful Sign in with Apple emulator for OAuth authorization code and OpenID Connect flows.","docsUrl":"https://docs.emulators.dev/apple","surfaces":[{"id":"oauth","kind":"oauth","title":"Sign in with Apple","status":"supported","basePath":"/auth"},{"id":"oidc","kind":"oidc","title":"OpenID Connect","status":"supported","basePath":"/.well-known"}],"auth":[{"id":"oauth-code","title":"OAuth authorization code","type":"oauth-authorization-code","status":"supported"},{"id":"oidc","title":"OIDC identity tokens","type":"oidc","status":"supported"}],"specs":[{"kind":"oauth-metadata","title":"Apple OIDC metadata","coverage":"hand-authored","operations":[{"operationId":"openid-configuration","method":"GET","path":"/.well-known/openid-configuration","status":"hand-authored","summary":"OIDC discovery document."},{"operationId":"jwks","method":"GET","path":"/auth/keys","status":"hand-authored","summary":"JWKS signing keys."},{"operationId":"authorize","method":"GET","path":"/auth/authorize","status":"hand-authored","summary":"Sign in with Apple authorization page."},{"operationId":"authorize-callback","method":"POST","path":"/auth/authorize/callback","status":"hand-authored","summary":"Issues an authorization code after user selection."},{"operationId":"token","method":"POST","path":"/auth/token","status":"hand-authored","summary":"Exchanges authorization codes and refresh tokens for access and id tokens."},{"operationId":"revoke","method":"POST","path":"/auth/revoke","status":"hand-authored","summary":"Revokes an access or refresh token."}]}],"seedSchema":{"description":"Seed Apple ID users and registered Sign in with Apple service clients.","fields":[{"key":"users","title":"Users","description":"Apple ID accounts addressable by email, optionally using private relay.","example":[{"email":"testuser@icloud.com","name":"Test User","is_private_email":false}]},{"key":"oauth_clients","title":"OAuth clients","description":"Registered service IDs with team id and redirect URIs.","example":[{"client_id":"com.example.app","team_id":"TEAM001","name":"My Apple App","redirect_uris":["http://localhost:3000/api/auth/callback/apple"]}]}],"example":{"users":[{"email":"testuser@icloud.com","name":"Test User","is_private_email":false}],"oauth_clients":[{"client_id":"com.example.app","team_id":"TEAM001","name":"My Apple App","redirect_uris":["http://localhost:3000/api/auth/callback/apple"]}]}},"stateModel":{"description":"Entities mutated by Apple Sign in with Apple flows.","collections":[{"name":"apple.users"},{"name":"apple.oauth_clients"}]},"connections":[{"id":"openid-client","title":"openid-client (TypeScript)","kind":"sdk","language":"typescript","description":"Discover the emulator issuer and run the authorization code flow.","template":"import * as client from \"openid-client\";\n\nconst config = await client.discovery(\n  new URL(\"{{baseUrl}}\"),\n  \"{{clientId}}\",\n  \"{{clientSecret}}\",\n);"},{"id":"apple-env","title":"Sign in with Apple (env)","kind":"env","language":"bash","description":"Point your auth library at the emulator issuer and endpoints.","template":"APPLE_ISSUER={{baseUrl}}\nAPPLE_AUTHORIZATION_URL={{baseUrl}}/auth/authorize\nAPPLE_TOKEN_URL={{baseUrl}}/auth/token\nAPPLE_JWKS_URL={{baseUrl}}/auth/keys\nAPPLE_CLIENT_ID={{clientId}}\nAPPLE_CLIENT_SECRET={{clientSecret}}"},{"id":"curl-discovery","title":"curl OIDC discovery","kind":"curl","language":"bash","description":"Fetch the OpenID Connect discovery document.","template":"curl -s {{baseUrl}}/.well-known/openid-configuration"},{"id":"curl-token","title":"curl token exchange","kind":"curl","language":"bash","description":"Exchange an authorization code for tokens.","template":"curl -s -X POST {{baseUrl}}/auth/token \\\n  -H \"content-type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=authorization_code&code=<code>&client_id={{clientId}}&client_secret={{clientSecret}}\""},{"id":"base-url","title":"Base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of the real provider.","template":"{{SERVICE_UPPER}}_BASE_URL={{baseUrl}}"},{"id":"create-credential","title":"Create a credential","kind":"curl","language":"bash","description":"Mint a working credential for this instance.","template":"curl -s -X POST {{controlBaseUrl}}/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"{{defaultAuthType}}\"}'"},{"id":"inspect-ledger","title":"Inspect requests","kind":"curl","language":"bash","description":"Read the request ledger to validate how your app called the service.","template":"curl -s {{controlBaseUrl}}/ledger"}],"resetBehavior":{"description":"Resets the instance to its seeded baseline.","reseeds":true,"clearsLedger":true,"clearsWebhooks":true},"ledger":{"description":"Recent provider requests with sensitive headers and fields redacted.","recordsFields":["timestamp","method","host","path","route","operationId","correlationId","identity","request","response","summary","sideEffects","webhookDeliveries","durationMs"],"redactsSensitive":true,"correlationId":true,"webhookDeliveries":true,"sideEffects":true,"persistent":true,"maxEntries":1000},"inspectorTabs":[{"id":"overview","title":"Overview","kind":"landing","description":"Service surfaces, base URLs, and connection snippets."},{"id":"ledger","title":"Ledger","kind":"ledger","description":"Recent provider requests recorded by the emulator."},{"id":"state","title":"State","kind":"state","description":"Current seeded and mutated instance state."},{"id":"credentials","title":"Credentials","kind":"credentials","description":"Mint tokens, API keys, or OAuth clients."},{"id":"seed","title":"Seed","kind":"seed","description":"Seed state or load a scenario."}]},"instance":null,"sampleInstance":{"service":"apple","instance":"your-instance","baseUrl":"https://apple.your-instance.emulators.dev","providerBaseUrl":"https://apple.your-instance.emulators.dev","controlBaseUrl":"https://apple.your-instance.emulators.dev/_emulate"},"connections":[{"id":"openid-client","title":"openid-client (TypeScript)","kind":"sdk","language":"typescript","description":"Discover the emulator issuer and run the authorization code flow.","template":"import * as client from \"openid-client\";\n\nconst config = await client.discovery(\n  new URL(\"{{baseUrl}}\"),\n  \"{{clientId}}\",\n  \"{{clientSecret}}\",\n);","body":"import * as client from \"openid-client\";\n\nconst config = await client.discovery(\n  new URL(\"https://apple.your-instance.emulators.dev\"),\n  \"<client_id>\",\n  \"<client_secret>\",\n);"},{"id":"apple-env","title":"Sign in with Apple (env)","kind":"env","language":"bash","description":"Point your auth library at the emulator issuer and endpoints.","template":"APPLE_ISSUER={{baseUrl}}\nAPPLE_AUTHORIZATION_URL={{baseUrl}}/auth/authorize\nAPPLE_TOKEN_URL={{baseUrl}}/auth/token\nAPPLE_JWKS_URL={{baseUrl}}/auth/keys\nAPPLE_CLIENT_ID={{clientId}}\nAPPLE_CLIENT_SECRET={{clientSecret}}","body":"APPLE_ISSUER=https://apple.your-instance.emulators.dev\nAPPLE_AUTHORIZATION_URL=https://apple.your-instance.emulators.dev/auth/authorize\nAPPLE_TOKEN_URL=https://apple.your-instance.emulators.dev/auth/token\nAPPLE_JWKS_URL=https://apple.your-instance.emulators.dev/auth/keys\nAPPLE_CLIENT_ID=<client_id>\nAPPLE_CLIENT_SECRET=<client_secret>"},{"id":"curl-discovery","title":"curl OIDC discovery","kind":"curl","language":"bash","description":"Fetch the OpenID Connect discovery document.","template":"curl -s {{baseUrl}}/.well-known/openid-configuration","body":"curl -s https://apple.your-instance.emulators.dev/.well-known/openid-configuration"},{"id":"curl-token","title":"curl token exchange","kind":"curl","language":"bash","description":"Exchange an authorization code for tokens.","template":"curl -s -X POST {{baseUrl}}/auth/token \\\n  -H \"content-type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=authorization_code&code=<code>&client_id={{clientId}}&client_secret={{clientSecret}}\"","body":"curl -s -X POST https://apple.your-instance.emulators.dev/auth/token \\\n  -H \"content-type: application/x-www-form-urlencoded\" \\\n  -d \"grant_type=authorization_code&code=<code>&client_id=<client_id>&client_secret=<client_secret>\""},{"id":"base-url","title":"Base URL (env)","kind":"env","language":"bash","description":"Point your SDK or app at the emulator instead of the real provider.","template":"{{SERVICE_UPPER}}_BASE_URL={{baseUrl}}","body":"APPLE_BASE_URL=https://apple.your-instance.emulators.dev"},{"id":"create-credential","title":"Create a credential","kind":"curl","language":"bash","description":"Mint a working credential for this instance.","template":"curl -s -X POST {{controlBaseUrl}}/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"{{defaultAuthType}}\"}'","body":"curl -s -X POST https://apple.your-instance.emulators.dev/_emulate/credentials \\\n  -H \"content-type: application/json\" \\\n  -d '{\"type\":\"oauth-authorization-code\"}'"},{"id":"inspect-ledger","title":"Inspect requests","kind":"curl","language":"bash","description":"Read the request ledger to validate how your app called the service.","template":"curl -s {{controlBaseUrl}}/ledger","body":"curl -s https://apple.your-instance.emulators.dev/_emulate/ledger"}]}