Skip to content

fix(auth): keep the invited admin role when joining through SSO - #3617

Open
yashranaway wants to merge 2 commits into
CapSoftware:mainfrom
yashranaway:fix/sso-invite-role
Open

yashranaway wants to merge 2 commits into
CapSoftware:mainfrom
yashranaway:fix/sso-invite-role

Conversation

@yashranaway

@yashranaway yashranaway commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

if an owner invites someone as admin and they join through the org's saml sso (the normal path once sso is on), they came in as a plain member and the admin invite got marked accepted, so the invite link was dead too and someone had to fix the role by hand.

now when sso creates a new membership it checks for a pending admin invite for that org and email in the same transaction and uses admin if there is one. existing memberships keep their role, and invites for other orgs or emails don't count.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no new actionable issues were found.

Summary

SSO now keeps the invited admin role when creating a membership.

  • A matching admin invitation gives a new SSO member the admin role.

Reviews (3) · Last reviewed commit: "fix(auth): lock the admin invite while p..." · Reviewed by Greptile

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 1, 2026 07:33 Inactive
@vercel

vercel Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
cap-status Skipped Skipped Nov 1, 2026 8:18am UTC

Comment thread packages/database/auth/sso.ts Resolved
@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@yashranaway

Copy link
Copy Markdown
Contributor Author

@greptileai review

@vercel
vercel Bot temporarily deployed to Preview – cap-status November 1, 2026 09:18 Inactive

This branch was previously deployed

1 inactive deployment
Preview – cap-status — b33a7b3b Deployed Nov 1, 2026 by vercel[bot]
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