Skip to content

[PB-7156]: fix(signup): send the invitation email token on guest register - #2361

Merged
apsantiso merged 4 commits into
masterfrom
feat/pb-7156-register-invitation-token
Dec 1, 2026
Merged

apsantiso merged 4 commits into
masterfrom
feat/pb-7156-register-invitation-token

Conversation

@apsantiso

@apsantiso apsantiso commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

What

  • /shared-guest and /workspace-guest read token from the URL and send it on registerPreCreatedUser.

Why

The token proves the guest owns the email. Drive server uses it to verify the email on register, so the guest sees what was shared with them right away.

Summary by CodeRabbit

  • New Features
    • Guest signup now carries the invitation email token from the signup link through registration when one is provided. Signup continues to work when no token is present.

@coderabbitai

coderabbitai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Guest signup views now pass the URL’s optional token query parameter through the signup callback to the pre-created-user registration request. Tests cover token forwarding and the absent-token case. The pinned @internxt/sdk version changes from 1.29.2 to 1.29.3.

Changes: Guest signup token forwarding

Layer / File(s) Summary
Pass invitation tokens from signup views
src/views/Signup/ShareGuestSignUpView.tsx, src/views/Signup/WorkspaceGuestSignUpView.tsx, src/views/Signup/utils/guestSignupOnSubmit.ts, src/views/Signup/utils/guestSignupOnSubmit.test.ts
Both guest signup views pass the URL token to guestSignupOnSubmit. The callback forwards the invitation token after the captcha value. Tests cover supplied and absent tokens.
Include the token in registration requests
src/views/Signup/hooks/useSignup.ts, src/views/Signup/hooks/useSignup.test.ts, package.json
doRegisterPreCreatedUser accepts the optional invitation token and includes it as token in the SDK request. The SDK dependency is updated to 1.29.3, and a test checks that the invitation ID and token reach the registration call.

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant GuestSignupView
  participant guestSignupOnSubmit
  participant doRegisterPreCreatedUser
  participant registerPreCreatedUser
  GuestSignupView->>guestSignupOnSubmit: Submit invitationEmailToken
  guestSignupOnSubmit->>doRegisterPreCreatedUser: Pass captcha and invitationEmailToken
  doRegisterPreCreatedUser->>registerPreCreatedUser: Send registration details, invitationId, and token
Loading

Suggested labels: enhancement

Merge Risk: Minimal · up to 9a46d · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description check Passed The description states the change in the What section: the /shared-guest and /workspace-guest routes read the token from the URL and send it on registerPreCreatedUser. The Why section gives the reason…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the change: the invitation email token is now sent on guest registration, which matches the changes to ShareGuestSignUpView, WorkspaceGuestSignUpView, useSignup, and guestSignupOnSubmi…
Full details: Description check

Explanation

The description states the change in the What section: the /shared-guest and /workspace-guest routes read the token from the URL and send it on registerPreCreatedUser. The Why section gives the reason: the token proves email ownership, and the Drive server uses it to verify the email during registration. The description omits the template sections Related Issues, Related Pull Requests, Checklist, Testing Process, and Additional Notes. The Testing Process section is the most important gap, since it does not say how the change was verified. The description is mostly complete on the core intent, so the check passes. The author should still fill in the missing template sections.

Full details: Title check

Explanation

The title names the change: the invitation email token is now sent on guest registration, which matches the changes to ShareGuestSignUpView, WorkspaceGuestSignUpView, useSignup, and guestSignupOnSubmit. It also cites the ticket ID and a conventional commit prefix. The title is specific and related to the main change. The changes to the SDK version bump and the tests are supporting details that the title does not need to cover.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dc3d0e91-50ce-4bec-a83b-797f68a995be
Commits

Reviewing files that changed from the base of the PR and between 5fb90fc and 9a46d69.

Files ignored due to path filters: 1

  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
Files selected for processing: 7

  • package.json
  • src/views/Signup/ShareGuestSignUpView.tsx
  • src/views/Signup/WorkspaceGuestSignUpView.tsx
  • src/views/Signup/hooks/useSignup.test.ts
  • src/views/Signup/hooks/useSignup.ts
  • src/views/Signup/utils/guestSignupOnSubmit.test.ts
  • src/views/Signup/utils/guestSignupOnSubmit.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9a46d69
Status: ✅  Deploy successful!
Preview URL: https://921ae202.drive-web.pages.dev
Branch Preview URL: https://feat-pb-7156-register-invita.drive-web.pages.dev

View logs

@apsantiso apsantiso self-assigned this Dec 1, 2026
@sonarqubecloud

sonarqubecloud Bot commented Dec 1, 2026

Copy link
Copy Markdown

@apsantiso
apsantiso marked this pull request as ready for review December 1, 2026 11:04
@apsantiso apsantiso changed the title [PB-7156]: feat(signup): send the invitation email token on guest register [PB-7156]: fix(signup): send the invitation email token on guest register Dec 1, 2026
@apsantiso
apsantiso merged commit 41de540 into master Dec 1, 2026
12 checks passed
@apsantiso
apsantiso deleted the feat/pb-7156-register-invitation-token branch December 1, 2026 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants