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.
As I needed the Apple provider in my own project, I figured I'd try and contribute to this awesome package and ecosystem. Feedback/changes to this PR welcome! 💚
Some things to note:
defineOAuthAppleEventHandler
will only return theuser
once for each user. Thetokens
are always returned (and include a uniquesub
for each user which can be used to match with user info stored before).defineOAuthAppleEventHandler
, like in/playground/server/routes/auth/apple.ts
, should NOT have the.get.ts
suffix, as the handler will handle bothPOST
andGET
requests.How to test:
In Apple's developer platform, create:
\n
)(I found this guide helpful.)
Add these credentials to your
.env
file and use thedefineOAuthAppleEventHandler
. Remember not to use.get.ts
-suffix to the auth route, as Apple will POST. Just naming itapple.ts
will work).Credits:
Code inspired by acidjazz's custom solution mentioned in #194.
Closes #187