Repository navigation
feat: CDK in-app widget paths (DO NOT MERGE until serverless backend lands) - #53
Merged
Merged
Conversation
…e client. Keep Basic clientId:userId[:hashedUserId] auth so existing widgets still work against the new API. Co-authored-by: Cursor <[email protected]>
The backend distinguishes the widget token from a server clientId:clientSecret token by it having 3 parts. When secureMode is off and there is no hashedUserId, the hash slot is sent empty (clientId:userId:) so the token is never mistaken for a server token. Co-authored-by: Cursor <[email protected]>
millerm30
marked this pull request as draft
September 17, 2026 16:23
…cations and preferences Refactor the NotificationAPIClientSDK to replace user resource paths with endUser resource paths for fetching and updating notifications and preferences. This change ensures that the SDK correctly targets the new API structure for end users.
…source paths Adjust the tests for NotificationAPIClientSDK to ensure they correctly reference the new endUser resource paths for user account metadata and user identification. This aligns the tests with the recent changes in the SDK's API structure.
millerm30
marked this pull request as ready for review
September 18, 2026 12:57
In-app and preferences drop the user id from the URL so they match cdkAuthUser, which reads the user from the token. Identify still posts to /enduser/{userId}.
Co-authored-by: Cursor <[email protected]>
sahandseifi
approved these changes
Sep 23, 2026
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 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.
Do not merge yet
Do not merge this until the leftover in-app backend work in
serverlessis merged and deployed This SDK talks to the CDK routes (/user/inapp,/users/{userId},/users/{userId}/preferences,/users/account-metadata). Merging or publishing it first would break widgets, because the backend only recognizes the widget token on those routes after that PR deploys.After the backend is in, publish a new
@notificationapi/coreand then land the React SDK PR (that one must bump its core dependency to the published version before merge).Summary
/{clientId}/users/{userId}/…clientId:userId:hashedUserId, with the hash slot empty (trailing colon) when there is nohashedUserId. This is how the backend's sharedauthenticateauthorizer distinguishes a widget token from a serverclientId:clientSecrettoken.hashedUserIdis still optional unless the environment has secure mode on — same rule as before.sdkDevModeonly existed for Slack OAuth)Test plan
api.mike-app.click/ws.mike-app.click(bell, live WS, prefs)Made with Cursor