Set Password
Auth Endpoints
Set Password
Set an initial password for an OAuth-only user
POST
Set Password
Sets an initial password for the currently authenticated user. This is for accounts that signed up through OAuth (or an external identity) and have no password yet — for example, so they can later sign in with email and password, or unlink their last OAuth identity without being locked out. Requires a valid access token in the
Returned when the user already has a password. Use
Change Password instead.
Authorization header.
This endpoint is only for users who do not already have a password. If the
user already has one, use Change Password
instead, which verifies the current password before changing it.
Headers
string
required
Bearer {accessToken} — a valid access token for the authenticated user.Body Parameters
string
required
The password to set for the account.
Response
boolean
true on success.string
Confirmation message:
"Password set successfully."Error Responses
User Not Found — 403
User Not Found — 403
Already Password Authenticated — 400
Already Password Authenticated — 400
See Also
useAuthhook —setPassword- Change Password
- Unlink OAuth Identity
- Built-in Auth guide

