{"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"}]}