[bug]: Show clear error when accepting workspace invite while signed in with wrong email
Author: IsmailofficialGithubCreated Aug 21, 2026Updated Sep 12, 2026
Labels🐛bugplane
Is there an existing issue for this?
- I have searched the existing issues
Current behavior
When a user opens a workspace invitation link while signed in with a different email than the invite, POST /api/workspaces/<slug>/invitations/<id>/join/ returns 403:
{"error": "You do not have permission to accept this invitation"}
Expected
- Show a toast with the API error
- If emails don't match, show UI explaining the invite was sent to X but they are signed in as Y
- Offer "Sign out and switch account"
- Prevent repeated Accept clicks while a request is in flight
Actual
apps/web/app/(all)/workspace-invitations/page.tsxonlyconsole.errors on failure- No toast / no mismatch guidance
- User can spam Accept and see repeated 403s in the network tab with no visible message
Steps to reproduce
- As Admin, invite user A (
[email protected]) to a workspace and copy the invite link (with invitation_id, slug, token). - Sign in as user B (
[email protected]). - Open the invite link:
/workspace-invitations/?invitation_id=...&slug=...&token=... - Click Accept.
- Observe: Network 403, console error object, no toast or on-screen explanation.
Environment
Deploy preview
Browser
Google Chrome
Variant
Local
Version
1.4.2
Source: makeplane/plane