Land newly-signed-up invited users in the invited org#2976
Draft
ignaciojimenezr wants to merge 4 commits into
Draft
Land newly-signed-up invited users in the invited org#2976ignaciojimenezr wants to merge 4 commits into
ignaciojimenezr wants to merge 4 commits into
Conversation
When a brand-new user signs up from an org invite email, they'd land in
their own auto-created personal org instead of the org they were invited
to. The signup email now carries `?invite_org={id}`; capture it at boot
(before the WorkOS redirect drops the URL), then set it active once the
user is authenticated and a confirmed member.
- new lib/pending-invite-org.ts: capture/read/clear the stashed org id
- main.tsx: capture `?invite_org` at boot
- use-app-state.ts: apply it once the user is a member, then clear it
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Contributor
Internal previewPreview URL: https://mcp-inspector-pr-2976.up.railway.app |
Rather than silently force the active org, notify the invited user and let them choose: - not a member yet (e.g. paid team seat still resolving): a one-per-session info toast that they'll get access once their seat is set up - once they're a member: a success toast with a "Switch organization" action that switches them in on click Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Pairs with the backend change (mcpjam-backend#652). When a brand-new user signs up from an org invite, they used to land in their own auto-created personal org instead of the org they were invited to. This drops them into the right one.
/?invite_org={id}(backend PR). This captures that id at boot — before the WorkOS redirect drops the URL — stashes it, and strips it from the URL.Reuses the existing active-org machinery — no routing or auth changes.
Draft / do not merge — needs the backend PR first, and wants a quick test in the WorkOS signup flow.
🤖 Generated with Claude Code
Summary by cubic
Newly signed-up invited users now land in the org they were invited to, with a one-click “Switch organization” prompt once membership is confirmed. Signed-out users hitting invite links or org routes are guided through the right auth flow and returned to the org.
New Features
?invite_orgat boot, stash a return-path marker insessionStorage, and strip it from the URL.ShareProjectDialog, show a clear toast when an invite requires paid seat payment.Dependencies
?invite_org={id}.Written for commit 7f0cfee. Summary will update on new commits.