Sign In with Apple
horizon_signin_appleSigns an existing Apple player in by validating the identity token from the app’s consent flow and creating a player session; does not create accounts.
Instructions
Signs an existing Apple player in using the identity token obtained by the app's Apple consent flow. Use when: the player requests Apple signin with a token whose audience matches this project's Apple configuration. Not for: driving provider UI, dashboard-account signin, or automatically signing up after any error. Only USER_NOT_FOUND permits the explicit horizon_signup_apple flow. Side effects: validates the identity token and creates a player session; it does not create an account or retry. Returns: user details, appleUserId, isPrivateRelayEmail, authStatus: AUTHENTICATED and accessToken. includeRefreshToken=true adds refreshToken and both expiry timestamps. Errors: 404 USER_NOT_FOUND permits signup with the still-valid identity JWT and first-consent name fields. 400 INVALID_APPLE_TOKEN or APPLE_NOT_CONFIGURED requires correction, not signup. Needs HORIZON_API_KEY. Every failure returns an error result (isError) with the HTTP status and body: a 401 that horizon_test_connection also returns means HORIZON_API_KEY is wrong, 429 means the account's per-minute rate limit was reached (wait a minute, then retry).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"appleIdentityToken": "<appleIdentityToken>"
},
"name": "horizon_signin_apple"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| appleIdentityToken | Yes | Apple identity-token JWT obtained after player consent, with audience matching this project's configured Services ID or Bundle ID | |
| includeRefreshToken | No | Explicit opt-in to a rotating 30-day refresh session; omitted or false preserves access-only behavior. Store refresh tokens in platform secure storage |