{"id":13526744,"url":"https://github.com/ananay/apple-auth","last_synced_at":"2025-04-01T07:33:37.385Z","repository":{"id":49763643,"uuid":"190443190","full_name":"ananay/apple-auth","owner":"ananay","description":"Sign in with Apple for Node.js","archived":false,"fork":false,"pushed_at":"2024-03-28T23:28:13.000Z","size":116,"stargazers_count":329,"open_issues_count":10,"forks_count":61,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-03T16:44:44.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ananay.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2019-06-05T17:57:20.000Z","updated_at":"2025-02-07T21:01:49.000Z","dependencies_parsed_at":"2024-06-18T13:56:38.095Z","dependency_job_id":null,"html_url":"https://github.com/ananay/apple-auth","commit_stats":{"total_commits":81,"total_committers":13,"mean_commits":6.230769230769231,"dds":0.5802469135802469,"last_synced_commit":"b8ac013aa9d34d45d61395510b995927a96c87d1"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananay%2Fapple-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananay%2Fapple-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananay%2Fapple-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ananay%2Fapple-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ananay","download_url":"https://codeload.github.com/ananay/apple-auth/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246600956,"owners_count":20803523,"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-08-01T06:01:34.071Z","updated_at":"2025-04-01T07:33:32.377Z","avatar_url":"https://github.com/ananay.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"#  Sign in with Apple for Node.js\n\n\u003ca href=\"https://twitter.com/intent/follow?screen_name=ananayarora\"\u003e\u003cimg src=\"https://img.shields.io/twitter/follow/ananayarora.svg?label=Follow%20@ananayarora\" alt=\"Follow @ananayarora\"\u003e\u003c/img\u003e\u003c/a\u003e\n\u003ca href=\"https://npmjs.com/package/apple-auth\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dt/apple-auth.svg\"\u003e\u003c/img\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/apple-auth.svg\"\u003e\u003c/img\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\nAn easy-to-use Node.js library for Signing in with Apple!\n\nNow with support for fetching the name and email!\n\n⚠️ Important note: Apple will only provide you with the name ONCE which is when the user taps \"Sign in with Apple\" on your app the first time. Keep in mind that you have to store this in your database at this time! For every login after that, Apple will provide you with a unique ID and the email that you can use to lookup the username in your database.\n\n**Check out the passport version of this library here:**\n\nhttps://github.com/ananay/passport-apple\n\nhttps://npmjs.com/package/passport-apple\n\n## Setup\n\nBegin by installing the library:\n```npm install apple-auth```\n\nThe configurations for Sign in with Apple are quite extensive so I've made an extensive SETUP.md file that you can read\nhttps://github.com/ananay/apple-auth/blob/master/SETUP.md\n\n## Example\n\nI've created an example of how to use this library with Express! Check it out here:\n\nhttps://github.com/ananay/apple-auth-example\n\n**Example live on https://apple.ananay.dev**\n\n## Usage\n\nInitialize it using the following code:\n```\nconst fs = require('fs');\nconst AppleAuth = require('apple-auth');\nconst config = fs.readFileSync(\"./config/config\");\nconst auth = new AppleAuth(config, './config/AuthKey.p8');\n```\n\nMethods:\n- ```auth.loginURL()``` - Creates the Login URL that your users will use to login to\n- ```auth.accessToken(grantCode)``` - Gets the access token from the grant code received\n- ```auth.refreshToken(refreshToken)``` - Gets the access token from a refresh token\n\n## Troubleshooting\n\n### `invalid_grant` when authorization code is generated by iOS App\nFix: If the authorizationCode was generated by your app, you should use your App ID as your clientId and not your service one. Discussion: https://github.com/ananay/apple-auth/issues/13\n\n## Questions / Contributing\n\nFeel free to open issues and pull requests. If you would like to be one of the core creators of this library, please reach out to me at i@ananayarora.com or message me on twitter @ananayarora!\n\n\u003ch4\u003e Created with ❤️ by \u003ca href=\"https://ananayarora.com\"\u003eAnanay Arora\u003c/a\u003e\u003c/h4\u003e\n\n\n#### ⚠️ Disclaimer\nThis repository is NOT developed, endorsed by Apple Inc. or even related at all to Apple Inc. This library was implemented solely by the community's hardwork, and based on information that is public on Apple Developer's website. The library is a helper library for anyone trying to implement Apple's Sign in with Apple.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananay%2Fapple-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fananay%2Fapple-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fananay%2Fapple-auth/lists"}