{"id":18611123,"url":"https://github.com/loginradius/apple-revoke-access-token","last_synced_at":"2025-11-02T21:30:32.987Z","repository":{"id":43573951,"uuid":"511434645","full_name":"LoginRadius/apple-revoke-access-token","owner":"LoginRadius","description":null,"archived":false,"fork":false,"pushed_at":"2023-04-07T01:23:22.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-12-27T01:42:46.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/LoginRadius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2022-07-07T07:53:42.000Z","updated_at":"2022-07-07T09:27:49.000Z","dependencies_parsed_at":"2024-11-07T03:12:51.492Z","dependency_job_id":"7c1562d2-eadb-4414-8972-b56f80ef2bb5","html_url":"https://github.com/LoginRadius/apple-revoke-access-token","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fapple-revoke-access-token","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fapple-revoke-access-token/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fapple-revoke-access-token/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LoginRadius%2Fapple-revoke-access-token/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LoginRadius","download_url":"https://codeload.github.com/LoginRadius/apple-revoke-access-token/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239400736,"owners_count":19632081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-07T03:12:46.802Z","updated_at":"2025-11-02T21:30:32.926Z","avatar_url":"https://github.com/LoginRadius.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apple revoke access token\nThis repository provides details on how to invalidate the apple access token based on LoginRadius AccountDeletion webhook event response https://www.loginradius.com/docs/integrations/webhook/.\n\n## Description\nThis respository provides a (POST) API endpoint which accepts the LoginRadius AccountDeletion webhook event response.\n\nFor the Sample AccountDeletion webhook event response please see: https://www.loginradius.com/docs/integrations/webhooks/samples/#deleteaccount9\n\nTo get AccountDeletion webhook event response on your URL, please configured it from the LoginRadius Admin Console: https://www.loginradius.com/docs/api/v2/integrations/webhooks/overview/#configurewebhook7 \n\n## Installation\nRun this command to install the required dependency.\n``` bash\nnpm install \n```\nCreate a `.env` file in root directory and add following constants\n 1. Create an environment variable `client_id` and add the apple client_id, which will be used in apple revoke token API call.\n 2. Create an environment variable `client_secret` and add the apple client_secret, which will be used in apple revoke token API call.\n For insights on how to create apple client_secret, please see https://github.com/LoginRadius/apple-client-secret-generator\n\ne.g \n![](assets/env.png)\n\nRun this command to start the server\n```bash\nnpm start\n```\n\n### Apple access token deletion endpoint API.\n \u003cbr\u003e\n This Api revokes the apple access token received from the user profile\n\n\n#### Api Endpoint: \n\n`http://localhost:3000/api/webhook`\n\n### Sample Request Payload\n\n![](assets/postmanCall.png)\n\n\nSample respone: \n\n#### Output\n```json\n{\n    \"description\": \"\",\n    \"statusCode\": 200\n}\n\nNote: On success, Apple only returns HTTP code as 200 and does not return any success message/description\n```\n\n### Common Error: \n```json\n{\n    \"message\": \"{\\\"error\\\":\\\"invalid_client\\\"}\",\n    \"description\": \"\",\n    \"statusCode\": 400,\n    \"stackTrace\": \"Error: got 400 response\\n    at generateErrorMessage .....\"\n}\n\nNote: It signifies Apple provided `client_id` and `client_secret` are incorrect/expired.\n```\n\nNote: this script consider your apple social provide name as `apple`, if for your LoginRadius App, apple social provider is configured with different name e.g apple_brand1 then please replace the same in the /api/webHookController.js file. ScreenShot reference: \n\n![](assets/providerName.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fapple-revoke-access-token","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floginradius%2Fapple-revoke-access-token","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floginradius%2Fapple-revoke-access-token/lists"}