Skip to main content
Let an authenticated user change their password from the account area. The SDK acquires the prld:pwd:write session scope via a short OTP challenge, then calls the change password endpoint — the scope is consumed atomically on save. See the Logged-in Change Password guide for the backend configuration (direct step-up on prld:pwd:write). This page focuses on the frontend integration.

Flow at a glance

  1. Request the prld:pwd:write scope via requestStepUp.
  2. Drive the OTP step that Prelude returns (verify_email or verify_sms, depending on the user’s identifiers).
  3. Once the SDK has auto-refreshed the session with the granted scope, call client.changePassword(password).

Example

For the full step-up SDK surface (startOTP, checkOTP, retryOTP, challenge callback shape), see Step-Up.
This example builds on the project from Introduction. Make sure you have a working password login first (Password) and that the user you log in with has an email_address or phone_number identifier.1. Configure direct step-up for prld:pwd:write
2. Register the scope
3. Replace src/App.jsx
src/App.jsx
Run npm run dev, log in, then click Change password. You’ll receive an OTP on the identifier type configured above. After verification, enter a new password — the prld:pwd:write scope is consumed atomically on save and removed from the session.