Skip to content

CEL-1814: carry the org-invite token in RegisterForm/RegisterInput - #22

Open
mong-x wants to merge 1 commit into
mainfrom
mjnong/cel-1814-auth-invite-token
Open

CEL-1814: carry the org-invite token in RegisterForm/RegisterInput#22
mong-x wants to merge 1 commit into
mainfrom
mjnong/cel-1814-auth-invite-token

Conversation

@mong-x

@mong-x mong-x commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Part of CEL-1814 (backend: CellarNode/cellarnode-backend-v2#712; producer UI: producer-dashboard PR from branch mjnong/cel-1814-invite-token).

  • RegisterInput.inviteToken?: string — sent verbatim by the auth API client (POST /auth/register body).
  • RegisterForm accepts an inviteToken prop and passes it on register.
  • Friendly error copy for the new typed backend codes: REGISTRATION_CLOSED (surface switch closed, invite required) and INVITE_TOKEN_INVALID (bad/expired/mismatched token).
  • Additive and backwards-compatible: no consumer changes required until they adopt the prop. Tests: token pass-through + both error surfaces (186 pass total, typecheck + build clean).

Note: producer-dashboard currently depends on @cellarnode/auth 0.15.0/0.16.0; its PR injects the token locally so it works before the next lib release, and can drop the shim when this ships.


Summary by cubic

Carries the org-invite token through RegisterForm and RegisterInput so the register call submits it, and maps the new invite-only backend error codes to friendly messages.

  • RegisterInput now accepts an optional inviteToken, sent verbatim by the auth API client.
  • RegisterForm accepts an inviteToken prop and includes it in the register call.
  • REGISTRATION_CLOSED and INVITE_TOKEN_INVALID errors now show specific, user-friendly copy.
  • Additive and backwards-compatible; existing consumers need no changes until they adopt the prop.
  • Adds tests for token pass-through and both error surfaces.

Written for commit aff2458. Summary will update on new commits.

Review in cubic

…closed-registration errors

- RegisterInput.inviteToken (optional) is sent verbatim by the API client
- RegisterForm accepts an inviteToken prop and passes it on register
- Friendly error copy for the new 403 REGISTRATION_CLOSED and 400
  INVITE_TOKEN_INVALID backend codes (invite-only admission, CEL-1815 switches)
- Tests: token pass-through + both error-code surfaces
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 59 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: e36a29a6-ac3f-4d65-911c-950319a660f5

📥 Commits

Reviewing files that changed from the base of the PR and between 6de0850 and aff2458.

📒 Files selected for processing (3)
  • __tests__/register-form.test.tsx
  • src/react/register-form.tsx
  • src/types.ts

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

Comment @coderabbitai help to get the list of available commands.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Adds an optional invite-token passthrough to registration and friendly handling for new invite-only backend errors. Additive, backwards-compatible, and covered by tests.

Re-trigger cubic

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.

1 participant