{"id":37473530,"url":"https://github.com/stefanprokopdev/verify-apple-id-token","last_synced_at":"2026-01-16T07:19:13.342Z","repository":{"id":37538426,"uuid":"247769282","full_name":"stefanprokopdev/verify-apple-id-token","owner":"stefanprokopdev","description":"Verify the Apple id token on the server side.","archived":false,"fork":false,"pushed_at":"2025-10-21T13:03:24.000Z","size":78,"stargazers_count":100,"open_issues_count":7,"forks_count":17,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-19T08:26:12.935Z","etag":null,"topics":["apple","apple-idtoken","id","idtoken","login","signin","signinwithapple","token","verification","verify"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanprokopdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-16T16:50:47.000Z","updated_at":"2025-11-10T17:03:20.000Z","dependencies_parsed_at":"2023-10-31T16:28:57.111Z","dependency_job_id":"9b2f51eb-e197-464b-a935-c8934f37136a","html_url":"https://github.com/stefanprokopdev/verify-apple-id-token","commit_stats":{"total_commits":190,"total_committers":8,"mean_commits":23.75,"dds":0.4526315789473684,"last_synced_commit":"a2fe3875f4c8532789fbaee7fd2ece3368e2bd1d"},"previous_names":["stefan-prokop-cz/verify-apple-id-token"],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/stefanprokopdev/verify-apple-id-token","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprokopdev%2Fverify-apple-id-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprokopdev%2Fverify-apple-id-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprokopdev%2Fverify-apple-id-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprokopdev%2Fverify-apple-id-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanprokopdev","download_url":"https://codeload.github.com/stefanprokopdev/verify-apple-id-token/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanprokopdev%2Fverify-apple-id-token/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T06:30:42.265Z","status":"ssl_error","status_checked_at":"2026-01-16T06:30:16.248Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","apple-idtoken","id","idtoken","login","signin","signinwithapple","token","verification","verify"],"created_at":"2026-01-16T07:19:13.230Z","updated_at":"2026-01-16T07:19:13.312Z","avatar_url":"https://github.com/stefanprokopdev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://github.com/stefan-prokop-cz/verify-apple-id-token/workflows/Build/badge.svg)](https://github.com/stefan-prokop-cz/verify-apple-id-token/actions)\n[![Publish Status](https://github.com/stefan-prokop-cz/verify-apple-id-token/workflows/Publish/badge.svg)](https://github.com/stefan-prokop-cz/verify-apple-id-token/actions)\n[![npm version](https://img.shields.io/npm/v/verify-apple-id-token)](https://www.npmjs.com/package/verify-apple-id-token)\n[![codecov](https://codecov.io/gh/stefan-prokop-cz/verify-apple-id-token/branch/master/graph/badge.svg?token=TD7C0Z3YA6)](https://codecov.io/gh/stefan-prokop-cz/verify-apple-id-token)\n\n# Verify Apple idToken\n\n- Small utility which verifies the Apple idToken\n- You can use it on the backend side\n- Token verification is part of [Apple sign-in](https://developer.apple.com/documentation/signinwithapplerestapi) process\n- The flow is\n  - Client app (iOS or Android) will redirect user to the OAuth2 login screen\n  - User will login\n  - App will receive the tokens\n  - App should send the `idToken` to the backend which will verify it\n- [Verification steps implemented](https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/verifying_a_user):\n  - Verify the JWS E256 signature using the server’s public key\n  - Verify the nonce for the authentication\n  - Verify that the iss field contains https://appleid.apple.com\n  - Verify that the aud field is the developer’s client_id\n  - Verify that the time is earlier than the exp value of the token\n\n## Installation\n\n```bash\nnpm install verify-apple-id-token\n```\n\n## Usage\n\n### Typescript\n\n```typescript\nimport verifyAppleToken from \"verify-apple-id-token\";\n\nconst jwtClaims = await verifyAppleToken({\n  idToken: \"yourIdToken\",\n  clientId: \"yourAppleClientId\", // or [\"app1ClientId\", \"app2ClientId\"]\n  nonce: \"nonce\", // optional\n});\n\njwtClaims.email; // get email of the user\n```\n\n### Javascript\n\n```javascript\nconst verifyAppleToken = require(\"verify-apple-id-token\").default;\n\nconst jwtClaims = await verifyAppleToken({\n  idToken: \"yourIdToken\",\n  clientId: \"yourAppleClientId\",  // or [\"app1ClientId\", \"app2ClientId\"]\n  nonce: \"nonce\", // optional\n});\n```\n\n## Contribution\n\nThank you for your interest in contributing to `verify-apple-id-token`! Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) to learn how to do it!\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprokopdev%2Fverify-apple-id-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanprokopdev%2Fverify-apple-id-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanprokopdev%2Fverify-apple-id-token/lists"}