forked from Techofficer/node-apple-signin
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revive node-apple-sign #1
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…h caret to have less maintenance
…nually calling it before each release
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Revive node-apple-sign
Revive development of node-apple-signin!
After trying to contact the original
node-apple-signin
owner alaborderie about helping out maintaining the library, but didn't get back a response. As I saw that compared to other "apple sign in" libraries this one seemed to have the biggest community wanting to improve it. Multiple opened issues and pull-requests that are sitting opened for months.As on npm there still isn't a go-to package for apple sign in, so taking matters in my own hands and forking library and implementing most changes from their PR and fixing issues. Trying to make it the go-to choice when you want to implement Apple Sign In.
^ Related
Changes
API
Changed
createClientSecret()
Now only takes in
privateKey
contents instead of a file path. Now you can use it to inject private key trough environmentals. Closes Private key must be a file Techofficer/node-apple-signin#4.Add support for privateKey as a string Techofficer/node-apple-signin#5
Support for
privateKeyPath
is kept in the library, but it is moved to a new functioncreateClientSecretFromPath()
(see below). It was done so we keep the function functional without overloading its behaviour depending on props.Added
createClientSecretFromPath()
Similar to
createClientSecret()
but instead of a public key it takes in a path to it. Internally it synchronously (as before) reads the private key contents and callscreateClientSecret()
.Added new optional
expirationDuration
option, which allows setting the clients secret expiration time, instead of using the max allowed 6 months. If not set, defaults back to 6 months.Removed
getApplePublicKey()
in-favour ofgetApplePublicKeys()
Added
getApplePublicKeys()
Changed
getAuthorizationToken()
:options.redirectUri
optional. Closes ✨Make redirect_url optional in refreshAuthorizationToken Techofficer/node-apple-signin#12, make 'redirectUri' optional on 'getAuthorizationToken' Techofficer/node-apple-signin#7🐛 Fix
getAuthorizationUrl()
:email
if didn't limitedopenId
scope, as I found no official documentation or their browser js library using that scopeMisc:
clientID
toclientId
to keep in consistent withteamId
,clientSecret
Internal
request-promise-native
foraxios
Improved Developer experience
Source code now fully typed using typescript with support for Node.js >= 10 (a.k.a ES2018)
Comes bundled with typescript types
📕Auto-generated docs using
typedoc
! Still needs work on documenting functions/interfaces to become more user friendly, so PR's welcomed!Improved formating by migrating from
eslint-config-airbnb-base
tostandard
+prettier
🔧Layed down the groundwork for unit tests using
ts-jest
TO-DO
@renarsvilnis/node-apple-signin
.redirectUri
optional - ✨Make redirect_url optional in refreshAuthorizationToken Techofficer/node-apple-signin#12, redirectUri should be optional on getAuthorizationToken Techofficer/node-apple-signin#6, make 'redirectUri' optional on 'getAuthorizationToken' Techofficer/node-apple-signin#7