Skip to content
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

Support for validating Sign in with Apple server-to-server notifications #78

Closed
ian-playside opened this issue Apr 16, 2021 · 1 comment · Fixed by #79
Closed

Support for validating Sign in with Apple server-to-server notifications #78

ian-playside opened this issue Apr 16, 2021 · 1 comment · Fixed by #79
Assignees
Labels
enhancement New feature or request

Comments

@ian-playside
Copy link
Contributor

I've been adding support for Sign in with Apple server-to-server notifications to an app I work on. They're useful for handling a couple of user lifecycle edge cases (e.g. when a user revokes the login).

The notification is provided as a JWT, with the event data on the payload. The process of validating the JWT is identical to verifyIdToken, just with a different payload type (in fact, I'm currrently using verifyIdToken and then casting the payload to the appropriate type).

Unfortunately, Sign in with Apple server-to-server webhooks are extremely poorly documented - here's the only public info I've been able to find:

Is this something you'd be interested in adding support for? If so, I'd be happy to make a PR.

@a-tokyo
Copy link
Owner

a-tokyo commented Apr 16, 2021

@ian-playside Thanks for contributing this. You mention really good points, I think such a feature would be quite useful.

We just need to ensure that we add proper documentation to our README, since as you mentioned the apple documentation is quite poor.

Feel free to open the PR, I'd also be happy to help if possible!

@a-tokyo a-tokyo added enhancement New feature or request WIP Work in progress labels Apr 16, 2021
ian-playside pushed a commit to ian-playside/apple-signin-auth that referenced this issue Apr 20, 2021
ian-playside pushed a commit to ian-playside/apple-signin-auth that referenced this issue Apr 20, 2021
ian-playside pushed a commit to ian-playside/apple-signin-auth that referenced this issue Apr 20, 2021
a-tokyo pushed a commit that referenced this issue Apr 20, 2021
…tions (#79)

* feat(#78): add support for server-to-server notifications

* fix: AppleIdTokenType sends is_private_email

Also, email_verified can be a string, per: https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_rest_api/authenticating_users_with_sign_in_with_apple#3383773

* docs(#78): add instructions for configuring server-to-server notifications

Co-authored-by: Ian Moriarty <ian@applant.is>
@a-tokyo a-tokyo removed the WIP Work in progress label Apr 20, 2021
ian-playside pushed a commit to ian-playside/apple-signin-auth that referenced this issue Apr 20, 2021
a-tokyo pushed a commit that referenced this issue Apr 21, 2021
Co-authored-by: Ian Moriarty <ian@applant.is>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants