Skip to content
Torii docs

Change or set password

POST
/_torii/auth/change-password
curl --request POST \
--url https://your-app.torii.so/_torii/auth/change-password \
--header 'Content-Type: application/json' \
--data '{ "currentPassword": "example", "newPassword": "example" }'

Changes the current user’s password. If the user has no password yet (OAuth-only account), currentPassword may be omitted and a password-enabled email identity is created.

Media type application/json

Payload for changing or setting the current user’s password

object
currentPassword

Current password. Required when the user already has a password. Omit or send null when the user is setting a password for the first time (e.g. OAuth-only account).

string | null
newPassword
required
string
>= 1 characters
Example generated
{
"currentPassword": "example",
"newPassword": "example"
}

OK

Media type application/json
object
Example generated
{}