Add first-login password setup flow
Accounts created by tenant/store onboarding (createtenantuser, createtenantlocation) have no password set. Previously the login form treated the backend's "please setup a password" response as a successful login instead of prompting for one. Now auth.ts recognizes it (PasswordSetupRequiredError) and LoginView routes to a create- password step, then signs in immediately with the new password. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1015,6 +1015,15 @@ export async function updateUser(input: UpdateUserInput): Promise<Row> {
|
||||
return fiestaSend<Row>('users/update', 'PUT', input);
|
||||
}
|
||||
|
||||
/**
|
||||
* PUT /users/update — set (or reset) a user's login password. Same endpoint as
|
||||
* `updateUser`, called with only userid + password so every other column is
|
||||
* left untouched (the backend's Updates() skips zero-value fields).
|
||||
*/
|
||||
export async function setUserPassword(userid: number, password: string): Promise<Row> {
|
||||
return fiestaSend<Row>('users/update', 'PUT', { userid, password });
|
||||
}
|
||||
|
||||
export interface CreateTenantLocationPayload {
|
||||
locationname: string;
|
||||
email?: string;
|
||||
|
||||
Reference in New Issue
Block a user