You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: accept invites via OAuth (Google/GitHub), not just passkeys (emdash-cms#1868)
* feat: accept invites via OAuth (Google/GitHub), not just passkeys
An invited user can complete their invite by signing in with a configured
OAuth provider. The invite token is carried through the OAuth state, and the
callback completes the invite (creating the user with the invited role and
linking the account) only when the provider-verified email matches the invited
address. The invite-accept page renders the configured providers under an
'Or continue with' divider.
* fix: consume invite token when linking existing account; distinct unverified-email error
Addresses review on emdash-cms#1868:
- acceptInviteViaOAuth now deletes the invite token in the existing-user and
existing-account branches, preserving the single-use guarantee.
- Unverified provider email throws a new invite_email_unverified code with its
own callback message, instead of the misleading email-mismatch message.
* fix: address review — linked-user email guard, invite-token validation, changeset
- acceptInviteViaOAuth: in the already-linked branch, require the linked user's
email to match the invite before consuming, so an identity whose email changed
after linking can't consume someone else's invite.
- oauth/[provider]: validate the ?invite= token shape/length before persisting
to the (unauthenticated) OAuth state store.
- changeset: rewrite as a single user-facing sentence.
* ci: update query-count snapshots
---------
Co-authored-by: emdashbot[bot] <emdashbot[bot]@users.noreply.github.com>
Co-authored-by: Matt Kane <mkane@cloudflare.com>
0 commit comments