{"_id":"@bolajiolajide/node-apple-signin","_rev":"6-097451ce32755f60a787e6602ff520d4","name":"@bolajiolajide/node-apple-signin","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.1":{"name":"@bolajiolajide/node-apple-signin","version":"0.0.1","description":"Node.JS wrapper around Sign In with Apple REST API","scripts":{"prepublish":"yarn build","build":"rm -rf dist && tsc","test":"jest","test:watch":"jest --watch","prepare":"yarn build","prepublishOnly":"yarn test && yarn lint","lint":"eslint ."},"homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","dependencies":{"jsonwebtoken":"8.5.1","node-fetch":"2.6.1","node-rsa":"1.0.5"},"main":"dist/index.js","types":"./dist/index.d.ts","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/fetch-mock":"^7.3.5","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@types/node":"^16.10.1","@types/node-fetch":"2.5.12","@types/node-rsa":"^1.1.1","babel-jest":"^27.2.4","eslint":"5.16.0","eslint-config-airbnb-base":"13.1.0","eslint-plugin-import":"^2.24.2","fetch-mock":"^9.11.0","fetch-mock-jest":"^1.5.1","jest":"^27.2.3","ts-jest":"^27.0.5","typescript":"^4.4.3"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"source":"./src/index.ts","gitHead":"59b089f154895944475f50fe6edd537cd1be6300","_id":"@bolajiolajide/node-apple-signin@0.0.1","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-vOncQYLo+IPfpcRAybg/yZ0i5CG9i8OMU5d2Gt5tpRGfTOQgj4rX66p0lugip9VyU3Oy429AK/wMLJTsDX9NfQ==","shasum":"36d4c8aebb51bb7a5dde04c5c7c397d8b9bbf1a0","tarball":"https://registry.npmjs.org/@bolajiolajide/node-apple-signin/-/node-apple-signin-0.0.1.tgz","fileCount":7,"unpackedSize":217745,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6qLUmkcpNib1ILe8KxYH9WSCOcaYF/MFiqqCz2mGqRAIgYyr3gCL4r4DbsCylZ+gheelv3xYbFX5CEMj7d7D68Wc="}]},"_npmUser":{"name":"bolajiolajide","email":"cooproton@gmail.com"},"directories":{},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-apple-signin_0.0.1_1633731417033_0.3309877719176375"},"_hasShrinkwrap":false},"0.0.2":{"name":"@bolajiolajide/node-apple-signin","version":"0.0.2","description":"Node.JS wrapper around Sign In with Apple REST API","scripts":{"prepublish":"yarn build","build":"yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json","test":"jest","test:watch":"jest --watch","prepare":"yarn build","prepublishOnly":"yarn test && yarn lint && yarn build","lint":"eslint .","ppublish":"npm publish --access public","clean":"rm -rf dist/"},"homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","dependencies":{"jsonwebtoken":"8.5.1","node-fetch":"2.6.1","node-rsa":"1.0.5"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/fetch-mock":"^7.3.5","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@types/node":"^16.10.1","@types/node-fetch":"2.5.12","@types/node-rsa":"^1.1.1","babel-jest":"^27.2.4","eslint":"5.16.0","eslint-config-airbnb-base":"13.1.0","eslint-plugin-import":"^2.24.2","fetch-mock":"^9.11.0","fetch-mock-jest":"^1.5.1","jest":"^27.2.3","ts-jest":"^27.0.5","typescript":"^4.4.3"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"source":"./src/index.ts","gitHead":"68dbb628f8b33e65ca4a9f74ececadc67f532595","_id":"@bolajiolajide/node-apple-signin@0.0.2","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-brLinnDQ5mMOgmvfdvvVJxpYYwBgKIkmdNjp3D6GX8nyNS7kn+osHvUyz16G/t4CnNpTNLAHNWjvvNc82mzIPg==","shasum":"36d8afcd926b3308dddaa124f97b1afdba973f8a","tarball":"https://registry.npmjs.org/@bolajiolajide/node-apple-signin/-/node-apple-signin-0.0.2.tgz","fileCount":6,"unpackedSize":217168,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFeLt5/MItaWoseqqphPCaTszB1ksdS3yDLUxMbP73x1AiEA6VRQlqRxHQL3C8tOI3pXZWXl5ZDm5rHII8auXIoFs5Q="}]},"_npmUser":{"name":"bolajiolajide","email":"cooproton@gmail.com"},"directories":{},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-apple-signin_0.0.2_1633922243584_0.1663427388516816"},"_hasShrinkwrap":false},"0.0.3":{"name":"@bolajiolajide/node-apple-signin","version":"0.0.3","description":"Node.JS wrapper around Sign In with Apple REST API","scripts":{"prepublish":"yarn build","build":"yarn clean && tsc -p tsconfig.json && tsc -p tsconfig-cjs.json","test":"jest","test:watch":"jest --watch","prepare":"yarn build","prepublishOnly":"yarn test && yarn lint && yarn build","lint":"eslint .","ppublish":"npm publish --access public","clean":"rm -rf dist/"},"homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","dependencies":{"jsonwebtoken":"8.5.1","node-fetch":"2.6.1","node-rsa":"1.0.5"},"main":"./dist/cjs/index.js","module":"./dist/esm/index.js","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/fetch-mock":"^7.3.5","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@types/node":"^16.10.1","@types/node-fetch":"2.5.12","@types/node-rsa":"^1.1.1","babel-jest":"^27.2.4","eslint":"5.16.0","eslint-config-airbnb-base":"13.1.0","eslint-plugin-import":"^2.24.2","fetch-mock":"^9.11.0","fetch-mock-jest":"^1.5.1","jest":"^27.2.3","ts-jest":"^27.0.5","typescript":"^4.4.3"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"source":"./src/index.ts","gitHead":"feb0cd97d4ee95504213030d7eedf4a326990032","_id":"@bolajiolajide/node-apple-signin@0.0.3","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-VhA5l5TA2JFIZvNTYCSr2olP2Efq/MfrE3gQ9HgJfBcIjNeYgIFe3i5lRdWCBZNrrTHa/s5nK+Fc0ezkQresbQ==","shasum":"2783f48b5a8a60f5f01e9653c2d3b2fdd805272f","tarball":"https://registry.npmjs.org/@bolajiolajide/node-apple-signin/-/node-apple-signin-0.0.3.tgz","fileCount":6,"unpackedSize":217169,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB2OJxVrzCyH6/flksyV+/vVb7vW10FrRUoMuli7z4RfAiEA1ccfCKNBmxe4G9Xd2phYSa5++QNYcXRrT74Br3Kd5Z0="}]},"_npmUser":{"name":"bolajiolajide","email":"cooproton@gmail.com"},"directories":{},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-apple-signin_0.0.3_1633922345326_0.05181899947776336"},"_hasShrinkwrap":false},"0.0.4":{"name":"@bolajiolajide/node-apple-signin","version":"0.0.4","description":"Node.JS wrapper around Sign In with Apple REST API","scripts":{"build":"tsc -p tsconfig.json","test":"jest","test:watch":"jest --watch","prepublishOnly":"yarn test && yarn lint","lint":"eslint .","ppublish":"npm publish --access public"},"homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","dependencies":{"jsonwebtoken":"8.5.1","node-fetch":"2.6.1","node-rsa":"1.0.5"},"main":"dist/index.js","types":"dist/index.d.ts","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/fetch-mock":"^7.3.5","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@types/node":"^16.10.1","@types/node-fetch":"2.5.12","@types/node-rsa":"^1.1.1","babel-jest":"^27.2.4","eslint":"5.16.0","eslint-config-airbnb-base":"13.1.0","eslint-plugin-import":"^2.24.2","fetch-mock":"^9.11.0","fetch-mock-jest":"^1.5.1","jest":"^27.2.3","ts-jest":"^27.0.5","typescript":"^4.4.3"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"source":"./src/index.ts","gitHead":"40802abc6f5c4d4d0c17c3d85cf12c140b184613","_id":"@bolajiolajide/node-apple-signin@0.0.4","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-rJPVeKI1hTiiMQ4MZu1VLdmR6Gtw5LGYbzYKc5qacWrfqUUF9R6K1tQPBc9J5Jf0lEPvK/YdXCqtC4ljpfEbcA==","shasum":"cac85d4d043e23062e067d4be848b8148c320164","tarball":"https://registry.npmjs.org/@bolajiolajide/node-apple-signin/-/node-apple-signin-0.0.4.tgz","fileCount":14,"unpackedSize":225132,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDT0wthgFPxnWRIykBmUzxVmVWKEiRooCSBFlvHsalmDAiABKFfA01cZeRm1IV0qNuDxAz8xO1zgcHNA1zHpCA37+A=="}]},"_npmUser":{"name":"bolajiolajide","email":"cooproton@gmail.com"},"directories":{},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-apple-signin_0.0.4_1633923424528_0.40439846699850346"},"_hasShrinkwrap":false},"0.0.5":{"name":"@bolajiolajide/node-apple-signin","version":"0.0.5","description":"Node.JS wrapper around Sign In with Apple REST API","scripts":{"build":"tsc -p tsconfig.json","test":"jest","test:watch":"jest --watch","prepublishOnly":"yarn test && yarn lint","lint":"eslint .","ppublish":"npm publish --access public"},"homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","dependencies":{"jsonwebtoken":"8.5.1","node-fetch":"2.6.1","node-rsa":"1.0.5"},"main":"dist/index.js","types":"dist/index.d.ts","devDependencies":{"@babel/core":"^7.15.5","@babel/preset-env":"^7.15.6","@babel/preset-typescript":"^7.15.0","@types/fetch-mock":"^7.3.5","@types/jest":"^27.0.2","@types/jsonwebtoken":"^8.5.5","@types/node":"^16.10.1","@types/node-fetch":"2.5.12","@types/node-rsa":"^1.1.1","babel-jest":"^27.2.4","eslint":"5.16.0","eslint-config-airbnb-base":"13.1.0","eslint-plugin-import":"^2.24.2","fetch-mock":"^9.11.0","fetch-mock-jest":"^1.5.1","jest":"^27.2.3","ts-jest":"^27.0.5","typescript":"^4.4.3"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"source":"./src/index.ts","gitHead":"dbea681b5baf022a5bd12ac01aa4420f3177e9e8","_id":"@bolajiolajide/node-apple-signin@0.0.5","_nodeVersion":"16.8.0","_npmVersion":"7.21.0","dist":{"integrity":"sha512-Qza3K900ZEbtO5g1J7kFX6meFOZ/ODG5IsWzA4s+sg6FBB2vK145JUJBLvtfmFElkW/d4eR9Z2o4cOq0D+2xWw==","shasum":"e8b88802a30e58bb624afe46973e239705f84411","tarball":"https://registry.npmjs.org/@bolajiolajide/node-apple-signin/-/node-apple-signin-0.0.5.tgz","fileCount":15,"unpackedSize":225831,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzZY/CRA9TVsSAnZWagAAxngP/RHGxUaGqHCc/AYGQc6r\nK4JG+BuBCRVWHTnhQ1BWVVz8w4SXpIr61ms6HNc/OG46JUZnxcCQSjFiG29k\n+2Onl1UmjRS6IQGgFzDiQfn4Xfr6Ay2CbF/9n6GogjVNXahmfI+1Eo2A6DNN\nYbwFQy0T+G35LbOFXW8VHowxeVE/wbRgAX3+mSx1g85PXgJmZV2G7ydaajxv\n+4FA3nOA3U4Hl94BjCGd2VPcjmhCw6KYvLBpq4m7G5oJjFIodLqIk0wMuVBR\nLvt5WH8WYcDcdHzSxVAkLNjwU7q8GjFP7/ncKFbOUtV4VNHYq+JMGT446AEY\n7VHFRM+EyAl4PtHTywtdttafsofN7tUEMKY9FAGlLaIUXY3JRt1m0PluS0Fm\nsG1SIFHkjAxA23P13EIJC1nZDGa64ckLi+RDJKbyoLiQ8xLh/IXDNcyS0tgH\no1bWfnm4bEgg6fyl7OG5jkoEtswp6f15IgL8nTCBHNAm2NIbvl4Q7ENV1Z/c\nii5V7xfKsCBNTigLSDL04mJ6khLsF4QiRP/1uSzlRu8Iigjyn/eGqa/Jwi0R\nHyEBTWIJLAJ+ehePgvelmvqXQA1fJ2yB8tHvGWqrHWl2p7rst6KwFzZchIie\nilKxJ8QV0WG8PH/1JDnR9CvguYHeuZjLtgBqWs61V3REsJo14uOGCFNtucrN\nU63b\r\n=HPzf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+KVU1lKn2+fIRtUkbiB8r2S8FvAO0hYR3R1hpsZltNgIgZmK2HCFDxIlJo9u1LmeB82X60u6r1RAY+e31eM3Ay2E="}]},"_npmUser":{"name":"bolajiolajide","email":"cooproton@gmail.com"},"directories":{},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-apple-signin_0.0.5_1633923493626_0.20336784495423554"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-08T22:16:56.892Z","0.0.1":"2021-10-08T22:16:57.159Z","modified":"2022-04-04T19:59:28.682Z","0.0.2":"2021-10-11T03:17:23.705Z","0.0.3":"2021-10-11T03:19:05.538Z","0.0.4":"2021-10-11T03:37:04.683Z","0.0.5":"2021-10-11T03:38:13.796Z"},"maintainers":[{"name":"bolajiolajide","email":"cooproton@gmail.com"}],"description":"Node.JS wrapper around Sign In with Apple REST API","homepage":"https://github.com/BolajiOlajide/node-apple-signin","keywords":["apple","signin","auth","login","node","authentication"],"repository":{"type":"git","url":"git+ssh://git@github.com/BolajiOlajide/node-apple-signin.git"},"contributors":[{"name":"Bolaji Olajide","url":"https://bolaji.de"}],"author":{"name":"Bolaji Olajide","email":"25608335+BolajiOlajide@users.noreply.github.com","url":"https://bolaji.de"},"bugs":{"url":"https://github.com/BolajiOlajide/node-apple-signin/issues","email":"25608335+BolajiOlajide@users.noreply.github.com"},"license":"MIT","readme":"\n# @bolajiolajide/node-apple-signin\n\nNode.JS wrapper around [Sign in with Apple REST API](https://developer.apple.com/documentation/signinwithapplerestapi).\nIt provides helper functionality around apple's authentication mechanism for NodeJS.\n\nThis module lets you authenticate users using Apple account in your Node.js application.\n\n## Prerequisites\n\n1. You should be enrolled in [Apple Developer Program](https://developer.apple.com/programs/).\n2. Please have a look at [Apple documentation](\nhttps://developer.apple.com/sign-in-with-apple/get-started/) related to \"Sign in with Apple\" feature.\n3. You should create App ID and Service ID in your Apple Developer Account.\n4. You should generate private key for your Service ID in your Apple Developer Account.\n\nMore detail about configuration can be found in [blog post](https://medium.com/@artyomefremov/add-sign-in-with-apple-button-to-your-website-today-part-1-12ed1444623a?postPublishedType=initial) and [Apple docs](https://help.apple.com/developer-account/#/dev1c0e25352).\n\n\n## Installation\n\nInstall the module using [npm](http://npmjs.com):\n\n```sh\nnpm install @bolajiolajide/node-apple-signin\n```\n\nor using [yarn](https://yarnpkg.com)\n\n```sh\nyarn add @bolajiolajide/node-apple-signin\n```\n\n\n## Usage/Examples\n\n### 1. Get authorization URL\n\nStart \"Sign in with Apple\" flow by redirecting user to the authorization URL.\n\n```js\nconst appleSignin = require(\"@bolajiolajide/node-apple-signin\");\n\nconst options = {\n    clientID: \"com.gotechmakers.auth.client\", // identifier of Apple Service ID.\n    redirectUri: \"http://localhost:3000/auth/apple/callback\",\n    state: \"123\", // optional, An unguessable random string. It is primarily used to protect against CSRF attacks.\n    scope: \"email\" // optional, default value is \"email\".\n};\n\nconst authorizationUrl = appleSignin.getAuthorizationUrl(options);\n```\n\nAlternatively, you can use [Sign In with Apple](https://developer.apple.com/documentation/signinwithapplejs) browser javascript library.\n\n### 2. Get access token\n\n2.1. Retrieve \"code\" query param from URL string when user is redirected to your site after successful sign in with Apple. Example:\n`http://localhost:3000/auth/apple/callback?code=somecode&state=123`.\n\n2.2. Exchange retrieved \"code\" to user's access token.\n\nMore detail can be found in [Apple docs](https://developer.apple.com/documentation/signinwithapplerestapi/generate_and_validate_tokens).\n\n```js\nconst clientSecret = appleSignin.getClientSecret({\n    clientID: \"com.gotechmakers.auth.client\", // identifier of Apple Service ID.\n    teamId: \"teamId\", // Apple Developer Team ID.\n    key: \"-----BEGIN PRIVATE KEY----- ...\", // private key associated with client ID\n    keyIdentifier: \"XXX\" // identifier of the private key.\n});\n\nconst options = {\n    clientID: \"com.gotechmakers.auth.client\", // identifier of Apple Service ID.\n    redirectUri: \"http://localhost:3000/auth/apple/callback\", // use the same value which you passed to authorisation URL,\n    clientSecret: clientSecret\n};\n\nappleSignin.getAuthorizationToken(code, options).then(tokenResponse => {\n    console.log(tokenResponse);\n}).catch(error => {\n    console.log(error);\n});\n```\n\nResult of ```getAuthorizationToken``` command is a JSON object representing Apple's [TokenResponse](https://developer.apple.com/documentation/signinwithapplerestapi/tokenresponse):\n\n```js\n{\n    access_token: \"ACCESS_TOKEN\", // A token used to access allowed data.\n    token_type: 'Bearer', // It will always be Bearer.\n    expires_in: 3600, // The amount of time, in seconds, before the access token expires.\n    refresh_token: \"REFRESH_TOKEN\", // used to regenerate new access tokens. Store this token securely on your server.\n    id_token: \"ID_TOKEN\" // A JSON Web Token that contains the user’s identity information.\n}\n```\n\n### 3. Verify token signature and get unique user's identifier\n\n```js\nappleSignin.verifyIdToken(tokenResponse.id_token, clientID).then(result => {\n    const userAppleId = result.sub;\n}).catch(error => {\n    // Token is not verified\n    console.log(error);\n});\n```\n\n### 4. Refresh access token after expiration\n\n```js\n\nconst clientSecret = appleSignin.getClientSecret({\n    clientID: \"com.gotechmakers.auth.client\", // identifier of Apple Service ID.\n    teamId: \"teamId\", // Apple Developer Team ID.\n    privateKeyPath: \"/var/www/app/AuthKey_XXX.p8\", // path to private key associated with your client ID.\n    keyIdentifier: \"XXX\" // identifier of the private key.\n});\n\nconst options = {\n    clientID: \"com.gotechmakers.auth.client\", // identifier of Apple Service ID.\n    clientSecret: clientSecret\n};\n\nappleSignin.refreshAuthorizationToken(refreshToken, options).then(result => {\n    const newAccessToken = result.access_token;\n}).catch(error => {\n    console.log(error);\n})\n```\n## Acknowledgements\n\n- [Techofficer's Implementation](https://github.com/Techofficer/node-apple-signin)\n## Authors\n\n- [@BolajiOlajide](https://www.github.com/BolajiOlajide)\n\n  \n## Contributing\n\nContributions are always welcome!  \nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n\n  \n## Running Tests\n\nTo run tests, run the following command\n\n```sh\n  npm run test\n```\n\n  ","readmeFilename":"README.md"}