Skip to content

feat(backend): support removing user passwords - #9326

Merged
joshrowley merged 5 commits into
mainfrom
feat/bapi-remove-password
Aug 5, 2026
Merged

feat(backend): support removing user passwords#9326
joshrowley merged 5 commits into
mainfrom
feat/bapi-remove-password

Conversation

@joshrowley

@joshrowley joshrowley commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Description

Adds clerkClient.users.removePassword(userId, params?) to @clerk/backend, exposing the password-removal Backend API operation through the JavaScript SDK. The operation is part of the public API specification published in clerk/openapi-specs#126.

The method sends POST /v1/users/{user_id}/remove_password without a request body by default, leaving existing sessions active. Passing { signOutOfOtherSessions: true } serializes sign_out_of_other_sessions: true and revokes the user's active sessions.

The JSDoc calls out an important API behavior: a password can be removed even when the user has no alternate sign-in method configured. It also includes usage examples for both session-handling options.

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

@vercel

vercel Bot commented Aug 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
clerk-js-sandbox Ready Ready Preview Aug 5, 2026 4:46am
swingset Ready Ready Preview Aug 5, 2026 4:46am

Request Review

@joshrowley joshrowley mentioned this pull request Aug 4, 2026
@joshrowley joshrowley changed the title feat(backend): add removePassword to User API feat(backend): support removing user passwords Aug 4, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

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

@clerk/backend

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

@clerk/chrome-extension

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

@clerk/clerk-js

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

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@9326

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@9326

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@9326

@clerk/expo

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

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@9326

@clerk/expo-passkeys

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

@clerk/express

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

@clerk/fastify

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

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@9326

@clerk/localizations

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

@clerk/nextjs

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

@clerk/nuxt

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

@clerk/react

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

@clerk/react-router

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

@clerk/shared

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

@clerk/tanstack-react-start

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

@clerk/testing

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

@clerk/ui

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

@clerk/upgrade

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

@clerk/vue

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

commit: e539b46

@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: e539b46

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

This PR includes changesets to release 10 packages
Name Type
@clerk/backend Minor
@clerk/astro Patch
@clerk/express Patch
@clerk/fastify Patch
@clerk/hono Patch
@clerk/nextjs Patch
@clerk/nuxt Patch
@clerk/react-router Patch
@clerk/tanstack-react-start Patch
@clerk/testing 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

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-08-05T04:48:02.231Z

Summary

Metric Count
Packages analyzed 19
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on e539b46.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 35e3a177-cab1-485c-a07d-1f9b6b138ae1

📥 Commits

Reviewing files that changed from the base of the PR and between 4a8c984 and e539b46.

📒 Files selected for processing (2)
  • .changeset/remove-user-password.md
  • packages/backend/src/api/endpoints/UserApi.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)
  • clerk/cli (auto-detected)
🚧 Files skipped from review as they are similar to previous changes (2)
  • .changeset/remove-user-password.md
  • packages/backend/src/api/endpoints/UserApi.ts

📝 Walkthrough

Walkthrough

Adds clerkClient.users.removePassword(userId, params?) to the backend API. The method accepts an optional signOutOfOtherSessions flag, validates the user ID, sends a POST request, and returns the updated user. Tests cover default and optional request bodies, response handling, and validation. A Changeset documents the minor release.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the new backend feature for removing user passwords.
Description check ✅ Passed The description directly explains the new API, request behavior, session handling, and documented usage.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/backend/src/api/endpoints/UserApi.ts`:
- Around line 729-737: Update the public removePassword method to explicitly
declare the return type Promise<User>, preserving its existing request behavior
and response handling.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: 8fcbaf8f-e89b-4899-8e0c-c171dfd8e6c8

📥 Commits

Reviewing files that changed from the base of the PR and between a66cbbf and 4a8c984.

📒 Files selected for processing (3)
  • .changeset/remove-user-password.md
  • packages/backend/src/api/__tests__/UserApi.test.ts
  • packages/backend/src/api/endpoints/UserApi.ts
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • clerk/clerk_go (manual)
  • clerk/dashboard (manual)
  • clerk/accounts (manual)
  • clerk/backoffice (manual)
  • clerk/clerk (manual)
  • clerk/clerk-docs (manual)
  • clerk/cloudflare-workers (manual)
  • clerk/clerk-ios (auto-detected)
  • clerk/clerk-android (auto-detected)
  • clerk/cli (auto-detected)

Comment thread packages/backend/src/api/endpoints/UserApi.ts Outdated
@joshrowley
joshrowley merged commit f38cf02 into main Aug 5, 2026
52 checks passed
@joshrowley
joshrowley deleted the feat/bapi-remove-password branch August 5, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants