-
Couldn't load subscription status.
- Fork 403
feat(backend): Initial handshake nonce pre-work #5750
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
Conversation
🦋 Changeset detectedLatest commit: 0d92d37 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces the initial handshake nonce pre-work and refactors parts of the handshake flow. Key changes include:
- Adding new types and constants to support organization sync target matching and handshake nonce handling.
- Refactoring the handshake logic by introducing the HandshakeService and updating request and authentication context handling.
- Adding new API resources, endpoints, and tests for the handshake payload flow.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/backend/src/tokens/types.ts | Added definitions for OrganizationSyncTargetMatchers and OrganizationSyncTarget. |
| packages/backend/src/tokens/request.ts | Updated request handling to leverage methods from HandshakeService. |
| packages/backend/src/tokens/handshake.ts | Introduced HandshakeService with methods to handle handshake flow including nonce handling (stubbed). |
| packages/backend/src/tokens/authenticateContext.ts | Extended context to include handshakeNonce from query params and cookies. |
| packages/backend/src/api/resources/HandshakePayload.ts | Added handshake payload resource model. |
| packages/backend/src/api/endpoints/HandshakePayloadApi.ts | New API endpoint for retrieving handshake payload. |
| packages/backend/src/constants.ts | Added handshakeNonce constant to cookies and query parameters. |
| packages/backend/src/tokens/tests/handshake.test.ts | Created tests to validate HandshakeService behavior. |
| .changeset/better-vans-obey.md | Changeset file to document the new handshake payload flow changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
Initial stub of the handshake nonce flow. Implementation will be in a separate PR
Related: SDKI-979
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change