Skip to content

ref(auth): Compose invitation account authentication - #125939

Merged
evanpurkhiser merged 1 commit into
ref/auth-add-invitation-account-badgefrom
ref/auth-compose-invitation-account-authentication
Sep 30, 2026
Merged

evanpurkhiser merged 1 commit into
ref/auth-add-invitation-account-badgefrom
ref/auth-compose-invitation-account-authentication

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Summary

Add InvitationAuthentication, the account-creation and sign-in step for the composed invitation acceptance page. Invitees can authenticate within the invitation screen, then review and explicitly accept the invitation using the account they authenticated with.

This component composes the registration and account-authentication forms used by the branded auth views. Keeping their form handling, authentication requests, provider links, and MFA UI shared lets fixes to the main authentication flow carry through to invitation acceptance.

Flow

  • Start with RegistrationForm, prefilled with the invitation email. Its secondaryAction renders “Have an account? Sign in” using a translated link-style button.
  • Switch to AccountAuthentication for password sign-in and the external-provider links supplied by authConfig. “Don't have an account? Create one” returns to registration.
  • When password sign-in requires MFA, keep the challenge inline and wait for MFA completion before reporting authentication. A pending challenge supplied by authConfig takes precedence over the initial registration view, allowing the parent to restore an in-progress sign-in.
  • During MFA, hide the registration switch. “Back to Login” uses the shared MFA cancellation request and returns to password sign-in. Local cancellation state overrides the initial pending-MFA configuration so the canceled challenge is not immediately redisplayed.
  • Animate transitions between registration, password sign-in, and MFA using the shared motion timing.

Invitation registration remains available when public signup is disabled; account creation continues to be authorized by the backend invitation session.

Component boundary

InvitationAuthentication owns registration/sign-in navigation and the local MFA-method state. It receives authentication configuration and the initial registration email from its parent.

Successful registration, password sign-in, or MFA completion calls onAuthenticated with the authenticated account and destination. The wrapper delegates the next step to the parent: the invitation page refreshes the invitation requirements and presents acceptance. Invitation fetching, organization SSO, account switching, acceptance, and final navigation belong to the surrounding flow.

This PR adds the component, its focused tests, and an interactive story. Route wiring and page orchestration are introduced in #125910, allowing this authentication step to be reviewed independently.

Verification

Focused component tests cover prefilled registration and navigation in both directions, successful registration without navigation, password sign-in and configured provider links when public signup is disabled, MFA completion before reporting authentication, and cancellation of a pending MFA challenge. The story documents the component's props and demonstrates the registration/sign-in UI.

@evanpurkhiser
evanpurkhiser requested review from a team as code owners September 29, 2026 19:53
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Sep 29, 2026
@github-actions

github-actions Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

@sentry

sentry Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Sentry Snapshot Testing

Name Added Removed Changed Renamed Unchanged Skipped Status
sentry-frontend
sentry-frontend
0 0 0 0 518 0 ✅ Unchanged

⚙️ sentry-frontend Snapshot Settings

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit dfc2513. Configure here.

@evanpurkhiser
evanpurkhiser force-pushed the ref/auth-compose-invitation-account-authentication branch from e6afa2a to df4643c Compare September 30, 2026 01:58
@evanpurkhiser
evanpurkhiser merged commit b9b349f into master Sep 30, 2026
75 checks passed
@evanpurkhiser
evanpurkhiser deleted the ref/auth-compose-invitation-account-authentication branch September 30, 2026 14:59

This branch was successfully deployed

1 active deployment
Preview — 8806bba2 Deployed Sep 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants