From c149dc2286f84e05d54b2722b50919640145cd2a Mon Sep 17 00:00:00 2001 From: Ilya Pakhomov Date: Wed, 25 Feb 2026 18:54:03 +0600 Subject: [PATCH 1/2] docs: missing js doc for useChangePassword hook from clerk --- .../src/features/clerk/hooks/use-update-password.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/lib/src/features/clerk/hooks/use-update-password.ts b/src/lib/src/features/clerk/hooks/use-update-password.ts index e8e8d17..1c8a03f 100644 --- a/src/lib/src/features/clerk/hooks/use-update-password.ts +++ b/src/lib/src/features/clerk/hooks/use-update-password.ts @@ -2,6 +2,17 @@ import { useUser } from '@clerk/clerk-expo'; import { useState } from 'react'; import { UseUpdatePasswordReturn } from '../types'; +/** + * Hook that provides functionality to update the current user's password. + * + * Requires the user to supply both the current password (for verification) and + * the new password. On success, the user's password is updated in Clerk; on + * failure, the hook returns an error without throwing. + * + * @returns {UseUpdatePasswordReturn} Object containing: + * - `updatePassword` — Updates the user's password using current and new password + * - `isPasswordUpdating` — Indicates whether a password update is currently in progress + */ export const useChangePassword = (): UseUpdatePasswordReturn => { const { user } = useUser(); const [isPasswordUpdating, setIsPasswordUpdating] = useState(false); From 6caf96af16dfaa285eefec29d500f0bfb8f5d6d0 Mon Sep 17 00:00:00 2001 From: Ilya Pakhomov Date: Wed, 25 Feb 2026 18:56:49 +0600 Subject: [PATCH 2/2] docs: update clerk modules readme --- README.md | 16 ++++++++++++++++ .../features/clerk/hooks/use-reset-password.ts | 2 -- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3aa8111..857f798 100644 --- a/README.md +++ b/README.md @@ -439,6 +439,14 @@ Returned Object: - `isCreating`: A boolean indicating whether an identifier is currently being added. - `isVerifying`: A boolean indicating whether a verification code is currently being processed. +#### `useUpdateIdentifier` + +Hook to update the user's primary identifier (email or phone): add and verify a new one, then set it as primary and remove the old one. + +Returned Object: + +- `createIdentifier`, `verifyCode`, `isCreating`, `isVerifying`, `isUpdating` — see JSDoc. + #### `useOtpVerification` Hook provides functionality for managing OTP (One Time Password) verification in user authentication workflows, supporting both sign-up and sign-in processes. @@ -459,3 +467,11 @@ Returned Object: - `resetPassword`: A function to reset the user's password by verifying the code and setting a new password. - `isCodeSending`: A boolean indicating if the verification code is being sent. - `isResetting`: A boolean indicating if the password is being reset. + +#### `useChangePassword` + +Hook to update the current user's password (requires current and new password). + +Returned Object: + +- `updatePassword`, `isPasswordUpdating` — see JSDoc. diff --git a/src/lib/src/features/clerk/hooks/use-reset-password.ts b/src/lib/src/features/clerk/hooks/use-reset-password.ts index 8ec6953..9d205d1 100644 --- a/src/lib/src/features/clerk/hooks/use-reset-password.ts +++ b/src/lib/src/features/clerk/hooks/use-reset-password.ts @@ -1,5 +1,3 @@ - - import { useState } from 'react'; import { OtpMethod, UseResetPasswordReturn } from '../types'; import { useClerkResources } from './use-clerk-resources';