Docs

verifyPassword()

Check that the user's password matches the supplied input. Useful for custom auth flows and re-verification.

function verifyPassword(params: VerifyPasswordParams): Promise<{ verified: true }>
  • Name
    userId
    Type
    string
    Description

    The ID of the user to verify the password for.

  • Name
    password
    Type
    string
    Description

    The password to verify.

const response = await clerkClient.users.verifyPassword({
  userId: 'user_123',
  password: 'testpassword123',
})

console.log(response)
/*
{ verified: true }
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint POST/users/{user_id}/verify_password. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on