Skip to content
Orvanov0.2.0

account.createRecovery

POST
/v1/account/recovery
import { Client, Orvano } from '@orvano/js'
const orvano = new Orvano(new Client({ endpoint: 'https://orvano.example.com' }))
await orvano.account.createRecovery({
email: 'ada@example.com',
redirectUrl: 'https://app.example.com/auth/callback',
})

Emails a password reset link, if the email belongs to an active user. The answer is the same 202 whether or not it does, so it never tells anyone which emails have accounts.

Client SDKs: JavaScript in the browser, Next.js, and Flutter call it for the signed in user, or with no credential. A failure answers with a problem details body; its code has a page under Errors.

Media typeapplication/json

A request to email a password reset link.

object
email
required

The email of the account; case does not matter.

string
redirectUrl
required

Your page that receives the link, on a host that is one of the project’s web platforms (http only on localhost or 127.0.0.1). The link adds orvano_type=recovery and orvano_token to it.

string

The request has been accepted for processing, but processing has not yet completed.

An unexpected error response.

Media typeapplication/problem+json

An RFC 9457 problem details body. Every operation declares it as its default response, sent as application/problem+json.

object
type
required

Identifies the error: https://orvano.dev/errors/<code>.

string
title
required

The standard HTTP reason phrase for the status.

string
status
required

The HTTP status code.

integer format: int32
detail

A short, safe sentence about this occurrence, when the server has one.

string
code
required

Orvano’s stable error code, from the ErrorCode catalog. SDKs treat it as a plain string.

string
requestId
required

The request ID to quote when reporting a problem; also sent as X-Request-Id.

string
Example
{
"type": "https://orvano.dev/errors/not_found",
"title": "Not Found",
"status": 404,
"code": "not_found",
"requestId": "4bf92f3577b34da6a3ce929d0e0e4736"
}