prld:pwd:write session scope via a short OTP challenge, then calls the reset endpoint — the scope is consumed atomically on save.
See the Logged-in Password Reset guide for the backend configuration (direct step-up on prld:pwd:write). This page focuses on the frontend integration.
Flow at a glance
- Request the
prld:pwd:writescope viarequestStepUp. - Drive the OTP step that Prelude returns (
verify_emailorverify_sms, depending on the user’s identifiers). - Once the SDK has auto-refreshed the session with the granted scope, call
client.resetPassword({ password }).
Example
otpCreate, otpCheck, otpRetry, challenge callback shape), see Step-Up.
Try it
Try it
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 2. Register the scope3. Replace Run
email_address or phone_number identifier.1. Configure direct step-up for prld:pwd:writesrc/App.jsxsrc/App.jsx
npm run dev, log in, then click Reset 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.