strengthCheck
abstract suspend fun strengthCheck(request: IB2BPasswordStrengthCheckParameters): B2BPasswordStrengthCheckResponse
Checks the strength of a password and returns a score with actionable feedback. Calls the POST /sdk/v1/b2b/passwords/strength_check endpoint. Does not require a session.
Kotlin:
StytchB2B.passwords.strengthCheck(
B2BPasswordStrengthCheckParameters(
password = "mypassword",
emailAddress = "user@example.com",
)
)Content copied to clipboard
iOS:
let params = B2BPasswordStrengthCheckParameters(password: "mypassword", emailAddress: "user@example.com")
let response = try await StytchB2B.passwords.strengthCheck(params)Content copied to clipboard
React Native:
StytchB2B.passwords.strengthCheck({ password: "mypassword", emailAddress: "user@example.com" })Content copied to clipboard
Return
B2BPasswordStrengthCheckResponse containing a strength score, breach detection result, and feedback.
Parameters
request
IB2BPasswordStrengthCheckParameters
password— The password to evaluate.emailAddress?— The member's email address, used to improve scoring by checking against personal information.
Throws
StytchError
if the request fails.
if the coroutine is cancelled.