Workspaces
Password changes and resets
Request a reset email, confirm a reset link, or change a password using the native authentication contract.
Use the native authentication contract for password changes, not Entity Service updates. A settings screen proves knowledge of the current password; a recovery screen proves possession of a reset token. See Authentication and workspace access for sign-in, MFA, and session handling.
Request a reset email
Use the configured Core client's AuthService.sendResetPasswordEmail(email, options?). It invokes the tenant's sendResetPasswordEmail function and returns the validated reset-email response. The optional app ("account" or "workspace") and appOrigin describe the application requesting recovery; they do not grant permission to redirect to arbitrary origins.
const result = await authService.sendResetPasswordEmail(email);
if (!result.success) {
throw new Error(result.message || "The reset email request failed.");
}
Let the backend deliver the reset link. Do not generate a replacement token or return a verification code to the browser. For delivery-provider setup, see Multilingual documents and email delivery.
Change a password while signed in
POST /api/auth/changePassword accepts a non-empty newPassword (minimum length 6) and the current password:
{
"oldPassword": "current-password",
"newPassword": "new-password-123"
}
The configured client exposes the same endpoint through AuthService.changePassword(oldPassword, newPassword, email?, resetToken?):
const result = await authService.changePassword(oldPassword, newPassword);
if (!result.success) {
throw new Error(result.message || "The password change failed.");
}
The native old-password path verifies the supplied password and clears resetPassCode and resetTokenDate after a successful update.
Confirm a reset link
Use the same endpoint with an empty oldPassword, the email address, and the token received in the reset link:
{
"oldPassword": "",
"newPassword": "new-password-123",
"email": "[email protected]",
"resetToken": "the-token-from-the-reset-link"
}
const result = await authService.changePassword("", newPassword, email, resetToken);
if (!result.success) {
throw new Error(result.message || "The password reset failed.");
}
The native endpoint delegates reset-token confirmation to the trusted sendResetPasswordEmail function with operation: "confirm". Clients call the authentication endpoint, not that internal confirmation branch, and must not query or update GsbUser themselves.
Credential boundary
These are the two supported authorization paths. There is no administrator bypass through generic entity save. Pass raw passwords and reset tokens through the established contract: GSB owns hashing at the native/database persistence boundary. Do not pre-hash inputs or compare stored hashes in application code.
Retain backend token expiry, one-time use, rate limiting, and authorization checks. Keep submitted passwords and tokens out of logs, browser storage, and application caches; do not persist a reset token extracted from its delivery link.
Pikbase authentication contract