Skip to content

Regression: Organization invitation 'continue' step ignores showOptionalFields (introduced in @clerk/clerk-js 5.103.2) #8374

@javipazos

Description

@javipazos

Preliminary Checks

Reproduction

https://github.com/javipazos/clerk-signup-continue-optional-fields-regression

Publishable key

pk_test_dmFsaWQtZ29waGVyLTMuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

After upgrading past @clerk/clerk-js@5.103.2, our organization invitation acceptance flow stopped rendering optional firstName / lastName fields. Invitees could previously add their name during sign-up; now they cannot, even with appearance.layout.showOptionalFields: true explicitly set.

This appears to be an unintended side effect of #7101, which was shipped as a patch release (5.103.1 → 5.103.2).

Steps to reproduce:

  1. Configure a Clerk dev instance with Organizations enabled and the following User model attributes:
    • first_name: enabled: true, required: false
    • last_name: enabled: true, required: false
    • password: enabled: true, required: true
    • email_address: enabled: true, required: true
  2. Run the reproduction repo (npm install && npm run dev), with appearance.layout.showOptionalFields: true set on <SignUp />.
  3. Send an organization invitation to a fresh email.
  4. Accept the invitation, landing on http://localhost:5173/?__clerk_status=sign_up&__clerk_ticket=...#/continue?....

Expected behavior:

The "Fill in missing fields" card renders Password, First name, and Last name. The name inputs are optional and the user can skip them. This matches the documented behavior of appearance.layout.showOptionalFields:

"Whether to show optional fields on the sign in and sign up forms."

It was also the behavior prior to 5.103.2.

Actual behavior:

The card renders only Password (plus OAuth alternatives). First name and Last name never appear, regardless of showOptionalFields.

The underlying SignUp resource confirms the fields exist as optional — they are just hidden by the component:

window.Clerk.client.signUp.status
// => "missing_requirements"
window.Clerk.client.signUp.missingFields
// => ["password"]
window.Clerk.client.signUp.optionalFields
// => ["last_name", "first_name", "oauth_google", "oauth_apple", "phone_number"]

Screenshots (in the repro repo's tree):

  • SignUpStart without a ticket → all fields render correctly (bug not present on the start step).
  • SignUpContinue with a valid ticket → only Password renders (this issue).

Root cause (code pointers)

PR #7101 redirects ticket-based sign-ups with missing_requirements status from SignUpStart to SignUpContinue. The two render fields very differently:

SignUpStartSignUpForm.tsx respects showOptionalFields:

// packages/clerk-js/src/ui/components/SignUp/SignUpForm.tsx
return !!fields[name] && (showOptionalFields || fields[name]?.required);

SignUpContinuesignUpFormHelpers.ts strips non-required fields unconditionally, ignoring showOptionalFields:

// packages/clerk-js/src/ui/components/SignUp/signUpFormHelpers.ts
// "Hide any non-required fields"
Object.entries(fields).forEach(([k, v]) => {
  if (v && !v.required) {
    delete fields[k as FieldKey];
  }
});

Same behavior on main (v6 packages/ui/...), so upgrading past the layout.showOptionalFieldsoptions.showOptionalFields rename does not fix this.

Impact

Organizations relying on the invitation flow to collect opt-in first/last name no longer do so. The regression is hard to diagnose because:

  • The Dashboard shows the fields enabled as optional.
  • The SignUp object exposes them in optionalFields.
  • The showOptionalFields prop accepts the value without warning.
  • The documented contract of showOptionalFields gives no hint that the continue step carves out optional fields.

Suggested fix

Either of:

  1. Preferred: have minimizeFieldsForExistingSignup honor showOptionalFields, so the prop means the same thing in both steps.
  2. Document the carve-out and provide an explicit opt-out (e.g. appearance.options.showOptionalFieldsOnContinue or a flag on <SignUp />).

Versions tested

  • @clerk/clerk-js@5.114.0 — bug present
  • @clerk/clerk-js@5.125.9 — bug present (latest v5)
  • @clerk/clerk-js on main (v6 packages/ui) — bug present
  • @clerk/clerk-js@5.103.1 — bug absent (ticket flow stays on SignUpStart)

Environment

  System:
    OS: macOS 26.4.1
    CPU: (12) arm64 Apple M4 Pro
  Binaries:
    Node: 24.11.0
    Yarn: 4.13.0
    npm: 11.6.1
  Browsers:
    Chrome: 147.0.7727.102
    Firefox: 149.0.2
    Safari: 26.4
  npmPackages:
    @clerk/clerk-react: ^5.58.1 => 5.61.5
    react: ^18.3.1 => 18.3.1
    react-dom: ^18.3.1 => 18.3.1
    typescript: ^5.4.5 => 5.9.3
    vite: ^5.3.1 => 5.4.21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions