reset
abstract suspend fun reset(request: IB2BDiscoveryPasswordResetParameters): B2BDiscoveryPasswordResetResponse
Completes the password reset in the cross-org discovery flow using the token from the reset email. Calls the POST /sdk/v1/b2b/passwords/discovery/reset endpoint. Retrieves the PKCE code verifier stored during the resetStart call.
Kotlin:
StytchB2B.discovery.passwords.reset(
B2BDiscoveryPasswordResetParameters(
passwordResetToken = "token-from-email",
password = "new-correct-horse-battery-staple",
)
)Content copied to clipboard
iOS:
let params = B2BDiscoveryPasswordResetParameters(
passwordResetToken: "token-from-email",
password: "new-correct-horse-battery-staple"
)
let response = try await StytchB2B.discovery.passwords.reset(params)Content copied to clipboard
React Native:
StytchB2B.discovery.passwords.reset({
passwordResetToken: "token-from-email",
password: "new-correct-horse-battery-staple",
})Content copied to clipboard
Return
B2BDiscoveryPasswordResetResponse containing discovered organizations and an intermediate session token.
Parameters
request
IB2BDiscoveryPasswordResetParameters
passwordResetToken— The password reset token extracted from the email link.password— The new password to set.
Throws
StytchError
if the token is invalid, expired, or no PKCE verifier is found in storage.
if the coroutine is cancelled.