Repository navigation
feat: Support mandatory server-to-server revocation notifications for SignInWithApple - #4193
Merged
Merged
Conversation
Contributor
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
nielsenko
force-pushed
the
apple-revocation
branch
2 times, most recently
from
November 12, 2025 11:36
c72b460 to
7f1850d
Compare
nielsenko
marked this pull request as ready for review
November 12, 2025 14:22
Collaborator
Author
|
There are known issues when using on web. |
nielsenko
commented
Nov 12, 2025
nielsenko
force-pushed
the
apple-revocation
branch
from
November 12, 2025 14:32
d541211 to
cbf5925
Compare
Collaborator
Author
|
Rebased on main |
SandPod
approved these changes
Nov 12, 2025
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Apple Sign In: Server-to-Server Revocation Notifications
This PR implements support for Apple's server-to-server revocation notifications, enabling automatic session revocation when users revoke consent or delete their Apple account.
Closes: #4105
Closes: #3453
Changes
Core Implementation
serverNotificationHandlerinAppleIDPUtilsto process Apple server-to-server notificationsAppleServerNotificationConsentRevokedandAppleServerNotificationAccountDeleteeventsAppleServerNotificationAccountDeletenotificationAppleRevokedNotificationRouteandAppleWebAuthenticationCallbackRouteclassesAPI Changes
AppleIDPconstructor now requiresTokenManagerinstead ofTokenIssuerAppleIDPUtilsconstructor now requiresTokenManagerparameterserverNotificationHandler()method - replaced with specificserverNotificationHandler(Session, Request)implementationrevokedNotificationHandler()method fromAppleIDPUtilswebAuthenticationCallbackRoute()method toAppleIDPfor foreign platform authentication callbacksRoute Structure
_SignInWithAppleRouteAppleRevokedNotificationRoutenow handles POST requests for server-to-server notificationsAppleWebAuthenticationCallbackRoutefor GET requests on foreign platforms (Web, Android)Example Updates
Fixes
This PR addresses server-to-server notification handling for Apple Sign In as part of the authentication system improvements.
Pre-launch Checklist
///), and made sure that the documentation follows the same style as other Serverpod documentation. I checked spelling and grammar.Breaking changes
TokenManager Requirement
AppleIDPfactory constructor now requiresTokenManager tokenManagerinstead ofTokenIssuer tokenIssuerAppleIDPUtilsconstructor now requiresTokenManager tokenManagerparametertokenIssuerparameter withtokenManagerwhen creatingAppleIDPorAppleIDPUtilsinstancesHandler Method Changes
Handler revokedNotificationHandler()fromAppleIDPUtilsHandler serverNotificationHandler(FutureOr<void> Function(AppleServerNotification) handler)fromAppleIDPUtilsFuture<Result> serverNotificationHandler(Session session, Request req)that directly processes notificationsrevokedNotificationRoute()onAppleIDPinstead of callingutils.revokedNotificationHandler()directlyRoute Setup