PasswordsClient

interface PasswordsClient

Password-based authentication methods.

Functions

Link copied to clipboard
abstract suspend fun authenticate(request: IPasswordsAuthenticateParameters): PasswordsAuthenticateResponse

Authenticates a user with their email address and password, establishing a session. Calls the POST /sdk/v1/passwords/authenticate endpoint.

Link copied to clipboard
abstract suspend fun create(request: IPasswordsCreateParameters): PasswordsCreateResponse

Creates a new user with an email address and password, and establishes a session. Calls the POST /sdk/v1/passwords endpoint.

Link copied to clipboard
abstract suspend fun resetByEmail(request: IPasswordsEmailResetParameters): PasswordsEmailResetResponse

Completes the email password reset flow by setting a new password using the token from the reset link. Calls the POST /sdk/v1/passwords/email/reset endpoint. Retrieves the PKCE code verifier stored during the corresponding resetByEmailStart call.

Link copied to clipboard
abstract suspend fun resetByEmailStart(request: IPasswordsEmailResetStartParameters): PasswordsEmailResetStartResponse

Initiates an email-based password reset by sending a reset link to the user's email address. Calls the POST /sdk/v1/passwords/email/reset/start endpoint. Generates and stores a PKCE code pair for use in the subsequent resetByEmail call.

Link copied to clipboard
abstract suspend fun resetByExistingPassword(request: IPasswordsExistingPasswordResetParameters): PasswordsExistingPasswordResetResponse

Resets a user's password by verifying their existing password, then setting a new one. Calls the POST /sdk/v1/passwords/existing_password/reset endpoint.

Link copied to clipboard
abstract suspend fun resetBySession(request: IPasswordsSessionResetParameters): PasswordsSessionResetResponse

Resets a user's password using their active session for verification (no existing password required). Calls the POST /sdk/v1/passwords/session/reset endpoint. Requires an active session.

Link copied to clipboard
abstract suspend fun strengthCheck(request: IPasswordsStrengthCheckParameters): PasswordsStrengthCheckResponse

Checks the strength of a password and returns a score with actionable feedback. Calls the POST /sdk/v1/passwords/strength_check endpoint. Does not create a session.