Authentication

Confirm password reset with OTP (project-based)

Set new password using the OTP sent to the user's email. Call after POST /api/auth/local/password-reset with projectId. Rate limited (OTP limit). If the user's email was not yet verified, it is marked as verified upon successful reset.

AuthPublic
GroupAuthentication
Rate limitSee Rate Limits
POST/api/auth/local/password-reset/confirm

SDK setup

Create a client instance. No authentication is required for this endpoint.

import { Configuration, AuthenticationApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const authentication = new AuthenticationApi(configuration);
import { Configuration, AuthenticationApi } from 'mudbase-sdk';

const configuration = new Configuration({
  basePath: 'https://cloud.mudbase.dev',
});

const authentication = new AuthenticationApi(configuration);

Example request

Call this endpoint using the client from SDK setup. Use View HTTP for a raw cURL example.

const { data: result } = await authentication.confirmLocalPasswordResetWithOtp(
  {
    email: "oswald_huel55@northwind.dev",
    projectId: "proj_8UM9pdQaTnt4",
    otp: "bandwidth generate",
    newPassword: "Str0ng_Sample_Pass!w0rd"
  }
);
const { data: result } = await authentication.confirmLocalPasswordResetWithOtp(
  {
    email: "oswald_huel55@northwind.dev",
    projectId: "proj_8UM9pdQaTnt4",
    otp: "bandwidth generate",
    newPassword: "Str0ng_Sample_Pass!w0rd"
  }
);

Playground

live

Test this endpoint with your own credentials. Your requests will be sent to the live API.

No Request Yet

Send a request to see the full inspector

Authentication

Public - No Auth Required

Request Body

json
{
  "email": "user@example.com",
  "projectId": "65f1a2b3c4d5e6f7a8b9c0d1",
  "otp": "123456",
  "newPassword": "NewSecurePass123!"
}
{
  "email": "user@example.com",
  "projectId": "65f1a2b3c4d5e6f7a8b9c0d1",
  "otp": "123456",
  "newPassword": "NewSecurePass123!"
}

Responses

200Password reset successful
json
{
  "message": "Password reset successful"
}
{
  "message": "Password reset successful"
}
400Invalid or expired OTP, or validation error
404-
429Too many attempts (rate limit)
500-

Errors

CodeMeaning
400Invalid or expired OTP, or validation error
404-
429Too many attempts (rate limit)
500-
Edit this page on GitHub
Chat with us