Skip to main content

3 posts tagged with "authentication"

View All Tags

setupToken is now required to set a password

POST /api/auth/set-password now requires the setupToken returned by POST /api/auth/verify-code (or the emailed verification link). A request without a valid token is rejected with 401; a token can be used once and expires after 30 minutes.

The browser sign-up flow already sends it. If you automate signup, update your flow to the order below and pass the token from step 2 to step 3:

  1. POST /api/auth/register with the email
  2. POST /api/auth/verify-code with the emailed code: the response includes setupToken
  3. POST /api/auth/set-password with email, password and setupToken

If your request is rejected, request a fresh code and repeat from step 2. The full request shapes are in Authentication and the OpenAPI document.

Documentation changed

One password rule everywhere

Every place that sets a password now applies the same rule: at least 8 characters, including a lowercase letter, an uppercase letter and a number. A symbol is welcome but does not replace a number.

  • The sign-up, set-password, reset-password and change-password forms all check the rule before you submit, so a password the server would refuse can no longer look acceptable.
  • The API returns a single message for every violation: "Password must be at least 8 characters and include a lowercase letter, an uppercase letter and a number".
  • If setting the password fails after your verification code was accepted, you can retry without requesting a new code.
  • The sign-up password form now includes your email as the username, so your browser's save-password prompt stores a complete login.

Email signup: verify-code now returns a setupToken

POST /api/auth/verify-code (and the emailed verification link) now returns a single-use setupToken, valid for 30 minutes. It proves that the person setting the password owns the email address.

Pass it to POST /api/auth/set-password together with the email and password:

{ "email": "you@example.com", "password": "<choose one>", "setupToken": "<from verify-code>" }

What you need to do. If you script or automate signup (agents, CLI-style flows), send the token from the verify step. It has been required since 2026-10-04 15:23 UTC: a set-password request without a valid token is rejected with 401. See the announcement.

Accounts that sign in with Google or through the Gluo portal cannot have a password set through this endpoint.

Documentation changed