Skip to content

Conversation

@austincalvelage
Copy link
Member

@austincalvelage austincalvelage commented Dec 5, 2025

Plain ticket: https://app.plain.com/workspace/w_01GT53BQWV3DFW6ECTWZNQ1E9K/thread/th_01JXCF79QQEG90RVAH13XPBZBC

This PR is paired with: [DASH-1319] -- Sign ups without password are no longer supported if which allows password to be optional.

This update addresses a user flow where users wanted to enable passwords but not require them at sign-up. The original intent was to allow users to sign up and log in initially using an email code, with the option to add a password later.

For a walkthrough of the flow, please refer to the video:
https://share.cleanshot.com/JMnC6nsG

Summary by CodeRabbit

Release Notes

  • New Features

    • Users can now add and manage a password directly in their account profile when password authentication is available, even when password login is not required.
  • Tests

    • Expanded test coverage to ensure correct behavior across different password configuration scenarios.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link

vercel bot commented Dec 5, 2025

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

Project Deployment Review Updated (UTC)
clerk-js-sandbox Ready Ready Preview, Comment Dec 17, 2025 10:10pm

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: 9daa5e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@clerk/clerk-js Patch
@clerk/chrome-extension Patch
@clerk/expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

📝 Walkthrough

Walkthrough

The changes modify password handling logic to support optional password scenarios. When a password is enabled at the instance level but not required, users can now add or set passwords in their user profile. The instanceIsPasswordBased getter in UserSettings is updated to check only if the password feature is enabled, rather than requiring it to also be mandatory. Associated test cases are updated to verify this new behavior where password-enabled-but-not-required instances are treated as password-based.

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and specifically describes the main change: enabling password setup from user profile when password is enabled but not required.
Linked Issues check ✅ Passed The PR implementation aligns with DASH-1319 requirements by modifying instanceIsPasswordBased logic to allow optional passwords, enabling the sign-up without password flow referenced in the issue.
Out of Scope Changes check ✅ Passed All changes are directly scoped to supporting optional passwords: UserSettings logic, test coverage, fixtures, and changeset documentation remain focused on the stated objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 7c12ada and be8adb8.

📒 Files selected for processing (4)
  • .changeset/wise-olives-drive.md (1 hunks)
  • packages/clerk-js/src/core/resources/UserSettings.ts (1 hunks)
  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts (1 hunks)
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (18)
**/*.{js,jsx,ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

All code must pass ESLint checks with the project's configuration

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.{js,jsx,ts,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use Prettier for consistent code formatting

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
packages/**/src/**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

TypeScript is required for all packages

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Follow established naming conventions (PascalCase for components, camelCase for variables)

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
packages/**/src/**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

packages/**/src/**/*.{ts,tsx,js,jsx}: Maintain comprehensive JSDoc comments for public APIs
Use tree-shaking friendly exports
Validate all inputs and sanitize outputs
All public APIs must be documented with JSDoc
Use dynamic imports for optional features
Provide meaningful error messages to developers
Include error recovery suggestions where applicable
Log errors appropriately for debugging
Lazy load components and features when possible
Implement proper caching strategies
Use efficient data structures and algorithms
Implement proper logging with different levels

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.{test,spec}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.{test,spec}.{ts,tsx,js,jsx}: Unit tests are required for all new functionality
Verify proper error handling and edge cases
Include tests for all new features

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.ts?(x)

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use proper TypeScript error types

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.{test,spec,e2e}.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use real Clerk instances for integration tests

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/typescript.mdc)

**/*.{ts,tsx}: Always define explicit return types for functions, especially public APIs
Use proper type annotations for variables and parameters where inference isn't clear
Avoid any type - prefer unknown when type is uncertain, then narrow with type guards
Implement type guards for unknown types using the pattern function isType(value: unknown): value is Type
Use interface for object shapes that might be extended
Use type for unions, primitives, and computed types
Prefer readonly properties for immutable data structures
Use private for internal implementation details in classes
Use protected for inheritance hierarchies
Use public explicitly for clarity in public APIs
Use mixins for shared behavior across unrelated classes in TypeScript
Use generic constraints with bounded type parameters like <T extends { id: string }>
Use utility types like Omit, Partial, and Pick for data transformation instead of manual type construction
Use discriminated unions instead of boolean flags for state management and API responses
Use mapped types for transforming object types
Use conditional types for type-level logic
Leverage template literal types for string manipulation at the type level
Use ES6 imports/exports consistently
Use default exports sparingly, prefer named exports
Document functions with JSDoc comments including @param, @returns, @throws, and @example tags
Create custom error classes that extend Error for specific error types
Use the Result pattern for error handling instead of throwing exceptions
Use optional chaining (?.) and nullish coalescing (??) operators for safe property access
Let TypeScript infer obvious types to reduce verbosity
Use const assertions with as const for literal types
Use satisfies operator for type checking without widening types
Declare readonly arrays and objects for immutable data structures
Use spread operator and array spread for immutable updates instead of mutations
Use lazy loading for large types...

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.test.{ts,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use React Testing Library for component testing

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use ESLint with custom configurations tailored for different package types

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.{js,ts,jsx,tsx,json,md,yml,yaml}

📄 CodeRabbit inference engine (.cursor/rules/monorepo.mdc)

Use Prettier for code formatting across all packages

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*

⚙️ CodeRabbit configuration file

If there are no tests added or modified as part of the PR, please suggest that tests be added to cover the changes.

**/*: Only comment on issues that would block merging, ignore minor or stylistic concerns.
Restrict feedback to errors, security risks, or functionality-breaking problems.
Do not post comments on code style, formatting, or non-critical improvements.
Keep reviews short: flag only issues that make the PR unsafe to merge.
Group similar issues into a single comment instead of posting multiple notes.
Skip repetition: if a pattern repeats, mention it once at a summary level only.
Do not add general suggestions, focus strictly on merge-blocking concerns.
If there are no critical problems, respond with minimal approval (e.g., 'Looks good'). Do not add additional review.
Avoid line-by-line commentary unless it highlights a critical bug or security hole.
Highlight only issues that could cause runtime errors, data loss, or severe maintainability issues.
Ignore minor optimization opportunities, focus solely on correctness and safety.
Provide a top-level summary of critical blockers rather than detailed per-line notes.
Comment only when the issue must be resolved before merge, otherwise remain silent.
When in doubt, err on the side of fewer comments, brevity and blocking issues only.
Avoid posting any refactoring issues.

Files:

  • packages/clerk-js/src/core/resources/__tests__/UserSettings.test.ts
  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
  • packages/clerk-js/src/core/resources/UserSettings.ts
**/*.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

**/*.tsx: Use error boundaries in React components
Minimize re-renders in React components

**/*.tsx: Use proper type definitions for props and state in React components
Leverage TypeScript's type inference where possible in React components
Use proper event types for handlers in React components
Implement proper generic types for reusable React components
Use proper type guards for conditional rendering in React components

Files:

  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.{md,tsx}

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Update documentation for API changes

Files:

  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.test.tsx

📄 CodeRabbit inference engine (.cursor/rules/development.mdc)

Use React Testing Library for component testing

Files:

  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{jsx,tsx}: Always use functional components with hooks instead of class components
Follow PascalCase naming for components (e.g., UserProfile, NavigationMenu)
Keep components focused on a single responsibility - split large components
Limit component size to 150-200 lines; extract logic into custom hooks
Use composition over inheritance - prefer smaller, composable components
Export components as named exports for better tree-shaking
One component per file with matching filename and component name
Separate UI components from business logic components
Use useState for simple state management in React components
Use useReducer for complex state logic in React components
Implement proper state initialization in React components
Use proper state updates with callbacks in React components
Implement proper state cleanup in React components
Use Context API for theme/authentication state management
Implement proper state persistence in React applications
Use React.memo for expensive components
Implement proper useCallback for handlers in React components
Use proper useMemo for expensive computations in React components
Implement proper virtualization for lists in React components
Use proper code splitting with React.lazy in React applications
Implement proper cleanup in useEffect hooks
Use proper refs for DOM access in React components
Implement proper event listener cleanup in React components
Use proper abort controllers for fetch in React components
Implement proper subscription cleanup in React components
Use proper HTML elements for semantic HTML in React components
Implement proper ARIA attributes for accessibility in React components
Use proper heading hierarchy in React components
Implement proper form labels in React components
Use proper button types in React components
Implement proper focus management for keyboard navigation in React components
Use proper keyboard shortcuts in React components
Implement proper tab order in React components
Use proper ...

Files:

  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
**/*.{test,spec}.{jsx,tsx}

📄 CodeRabbit inference engine (.cursor/rules/react.mdc)

**/*.{test,spec}.{jsx,tsx}: Use React Testing Library for unit testing React components
Test component behavior, not implementation details
Use proper test queries in React Testing Library tests
Implement proper test isolation in React component tests
Use proper test coverage in React component tests
Test component interactions in integration tests
Use proper test data in React component tests
Implement proper test setup in React component tests
Use proper test cleanup in React component tests
Implement proper test assertions in React component tests
Use proper test structure for React component tests

Files:

  • packages/ui/src/components/UserProfile/__tests__/SecurityPage.test.tsx
🔇 Additional comments (1)
packages/clerk-js/src/core/resources/UserSettings.ts (1)

189-191: No merge-blocking issues found with this change. All callers of instanceIsPasswordBased correctly handle the new behavior where the property returns true if password is enabled, regardless of the required flag. The change is an intentional semantic expansion that improves UX by allowing password management UI to display when password is optionally enabled.


Comment @coderabbitai help to get the list of available commands and usage tips.

@austincalvelage
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @austincalvelage - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.2.8-snapshot.v20251205185244
@clerk/astro 2.16.6-snapshot.v20251205185244
@clerk/backend 2.26.0-snapshot.v20251205185244
@clerk/chrome-extension 2.8.10-snapshot.v20251205185244
@clerk/clerk-js 5.113.1-snapshot.v20251205185244
@clerk/clerk-expo 2.19.10-snapshot.v20251205185244
@clerk/express 1.7.56-snapshot.v20251205185244
@clerk/fastify 2.6.8-snapshot.v20251205185244
@clerk/nextjs 6.36.1-snapshot.v20251205185244
@clerk/nuxt 1.13.6-snapshot.v20251205185244
@clerk/react-router 2.3.3-snapshot.v20251205185244
@clerk/remix 4.13.23-snapshot.v20251205185244
@clerk/tanstack-react-start 0.27.8-snapshot.v20251205185244
@clerk/testing 1.13.22-snapshot.v20251205185244

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/clerk-expo

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/remix

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-react-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@austincalvelage
Copy link
Member Author

!snapshot

@clerk-cookie
Copy link
Collaborator

Hey @austincalvelage - the snapshot version command generated the following package versions:

Package Version
@clerk/agent-toolkit 0.2.9-snapshot.v20251217162523
@clerk/astro 3.0.0-snapshot.v20251217162523
@clerk/backend 3.0.0-snapshot.v20251217162523
@clerk/chrome-extension 3.0.0-snapshot.v20251217162523
@clerk/clerk-js 6.0.0-snapshot.v20251217162523
@clerk/dev-cli 1.0.0-snapshot.v20251217162523
@clerk/expo 3.0.0-snapshot.v20251217162523
@clerk/expo-passkeys 1.0.0-snapshot.v20251217162523
@clerk/express 2.0.0-snapshot.v20251217162523
@clerk/fastify 2.6.9-snapshot.v20251217162523
@clerk/localizations 4.0.0-snapshot.v20251217162523
@clerk/nextjs 7.0.0-snapshot.v20251217162523
@clerk/nuxt 2.0.0-snapshot.v20251217162523
@clerk/react 6.0.0-snapshot.v20251217162523
@clerk/react-router 3.0.0-snapshot.v20251217162523
@clerk/shared 4.0.0-snapshot.v20251217162523
@clerk/tanstack-react-start 1.0.0-snapshot.v20251217162523
@clerk/testing 2.0.0-snapshot.v20251217162523
@clerk/ui 1.0.0-snapshot.v20251217162523
@clerk/upgrade 2.0.0-snapshot.v20251217162523
@clerk/vue 2.0.0-snapshot.v20251217162523

Tip: Use the snippet copy button below to quickly install the required packages.
@clerk/agent-toolkit

npm i @clerk/[email protected] --save-exact

@clerk/astro

npm i @clerk/[email protected] --save-exact

@clerk/backend

npm i @clerk/[email protected] --save-exact

@clerk/chrome-extension

npm i @clerk/[email protected] --save-exact

@clerk/clerk-js

npm i @clerk/[email protected] --save-exact

@clerk/dev-cli

npm i @clerk/[email protected] --save-exact

@clerk/expo

npm i @clerk/[email protected] --save-exact

@clerk/expo-passkeys

npm i @clerk/[email protected] --save-exact

@clerk/express

npm i @clerk/[email protected] --save-exact

@clerk/fastify

npm i @clerk/[email protected] --save-exact

@clerk/localizations

npm i @clerk/[email protected] --save-exact

@clerk/nextjs

npm i @clerk/[email protected] --save-exact

@clerk/nuxt

npm i @clerk/[email protected] --save-exact

@clerk/react

npm i @clerk/[email protected] --save-exact

@clerk/react-router

npm i @clerk/[email protected] --save-exact

@clerk/shared

npm i @clerk/[email protected] --save-exact

@clerk/tanstack-react-start

npm i @clerk/[email protected] --save-exact

@clerk/testing

npm i @clerk/[email protected] --save-exact

@clerk/ui

npm i @clerk/[email protected] --save-exact

@clerk/upgrade

npm i @clerk/[email protected] --save-exact

@clerk/vue

npm i @clerk/[email protected] --save-exact

@austincalvelage austincalvelage changed the title feat(clerk-js): Optional password exploration feat(clerk-js): Ability to set password from user profile when password is enabled and not required Dec 17, 2025
@austincalvelage austincalvelage marked this pull request as ready for review December 17, 2025 21:59
@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 17, 2025

Open in StackBlitz

@clerk/agent-toolkit

npm i https://pkg.pr.new/@clerk/agent-toolkit@7379

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@7379

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@7379

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@7379

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@7379

@clerk/dev-cli

npm i https://pkg.pr.new/@clerk/dev-cli@7379

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@7379

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@7379

@clerk/express

npm i https://pkg.pr.new/@clerk/express@7379

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@7379

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@7379

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@7379

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@7379

@clerk/react

npm i https://pkg.pr.new/@clerk/react@7379

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@7379

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@7379

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@7379

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@7379

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@7379

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@7379

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@7379

commit: 9daa5e7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants