From 9328b10621d7fe8d6ddf4e317ec4a34ab77aeae5 Mon Sep 17 00:00:00 2001 From: Mike Wickett Date: Fri, 23 Oct 2026 16:02:18 -0400 Subject: [PATCH 1/2] fix(backend): point lockUser() JSDoc to the Protections Dashboard page --- .changeset/lockuser-protect-protections-link.md | 5 +++++ packages/backend/src/api/endpoints/UserApi.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lockuser-protect-protections-link.md diff --git a/.changeset/lockuser-protect-protections-link.md b/.changeset/lockuser-protect-protections-link.md new file mode 100644 index 00000000000..30542a7c5b5 --- /dev/null +++ b/.changeset/lockuser-protect-protections-link.md @@ -0,0 +1,5 @@ +--- +'@clerk/backend': patch +--- + +Update the `lockUser()` JSDoc to link to the **Protections** page under **Protect** (`/~/protect/protections`) in the Clerk Dashboard, and to the current guide on user locks. diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index 28f2b134078..3ae4d7dca84 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -789,7 +789,7 @@ export class UserAPI extends AbstractAPI { } /** - * Locks the given [`User`](https://clerk.com/docs/reference/backend/types/backend-user), which means that they are not allowed to sign in again until the lock expires or is manually unlocked. By default, lockout duration is 1 hour, but it can be configured in the application's [**System**](https://dashboard.clerk.com/~/protect/rules) settings under **Protect** > **Rules**. See the [guide on user locks](https://clerk.com/docs/guides/secure/user-lockout). + * Locks the given [`User`](https://clerk.com/docs/reference/backend/types/backend-user), which means that they are not allowed to sign in again until the lock expires or is manually unlocked. By default, lockout duration is 1 hour, but it can be configured on the application's [**Protections**](https://dashboard.clerk.com/~/protect/protections) page under **Protect**. See the [guide on user locks](https://clerk.com/docs/guides/protect/user-lockout). * @param userId - The ID of the user to lock. */ public async lockUser(userId: string) { From 6f571cbbacc485dbc117de7e54524858cbd7a460 Mon Sep 17 00:00:00 2001 From: Michael Novotny Date: Fri, 23 Oct 2026 15:26:52 -0500 Subject: [PATCH 2/2] docs(backend): point remaining user-lockout JSDoc links at the current guide Co-Authored-By: Claude Opus 5.5 --- .changeset/lockuser-protect-protections-link.md | 2 +- packages/backend/src/api/endpoints/UserApi.ts | 4 ++-- packages/backend/src/api/resources/User.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.changeset/lockuser-protect-protections-link.md b/.changeset/lockuser-protect-protections-link.md index 30542a7c5b5..19cf31d9375 100644 --- a/.changeset/lockuser-protect-protections-link.md +++ b/.changeset/lockuser-protect-protections-link.md @@ -2,4 +2,4 @@ '@clerk/backend': patch --- -Update the `lockUser()` JSDoc to link to the **Protections** page under **Protect** (`/~/protect/protections`) in the Clerk Dashboard, and to the current guide on user locks. +Update the `lockUser()` JSDoc to link to the **Protections** page under **Protect** (`/~/protect/protections`) in the Clerk Dashboard. Point the user lock links in the `lockUser()`, `unlockUser()`, `CreateUserParams.locked`, and `User.locked` JSDoc to the current guide on user locks. diff --git a/packages/backend/src/api/endpoints/UserApi.ts b/packages/backend/src/api/endpoints/UserApi.ts index 3ae4d7dca84..b41d36ec020 100644 --- a/packages/backend/src/api/endpoints/UserApi.ts +++ b/packages/backend/src/api/endpoints/UserApi.ts @@ -276,7 +276,7 @@ export type CreateUserParams = { createdAt?: Date; /** When set to `true`, the user is created already banned and cannot sign in. */ banned?: boolean; - /** When set to `true`, the user is created already locked. Requires the [user lockout feature](https://clerk.com/docs/guides/secure/user-lockout#lock-a-user-programmatically) to be enabled on the instance. */ + /** When set to `true`, the user is created already locked. Requires the [user lockout feature](https://clerk.com/docs/guides/protect/user-lockout#lock-a-user-programmatically) to be enabled on the instance. */ locked?: boolean; } & UserMetadataParams & (UserPasswordHashingParams | object); @@ -800,7 +800,7 @@ export class UserAPI extends AbstractAPI { }); } - /** Removes a sign-in lock from the given [`User`](https://clerk.com/docs/reference/backend/types/backend-user), allowing them to sign in again. See the [guide on user locks](https://clerk.com/docs/guides/secure/user-lockout). + /** Removes a sign-in lock from the given [`User`](https://clerk.com/docs/reference/backend/types/backend-user), allowing them to sign in again. See the [guide on user locks](https://clerk.com/docs/guides/protect/user-lockout). * @param userId - The ID of the user to unlock. */ public async unlockUser(userId: string) { diff --git a/packages/backend/src/api/resources/User.ts b/packages/backend/src/api/resources/User.ts index fcef264c219..7f1b713c9f8 100644 --- a/packages/backend/src/api/resources/User.ts +++ b/packages/backend/src/api/resources/User.ts @@ -28,7 +28,7 @@ export class User { readonly twoFactorEnabled: boolean, /** Whether the user is banned or not. */ readonly banned: boolean, - /** Whether the user is [locked](https://clerk.com/docs/guides/secure/user-lockout) or not. */ + /** Whether the user is [locked](https://clerk.com/docs/guides/protect/user-lockout) or not. */ readonly locked: boolean, /** The Unix timestamp when the user was first created. */ readonly createdAt: number,