feat: add master password hint functionality

- Updated user model to include masterPasswordHint.
- Modified sync handler to return masterPasswordHint.
- Implemented password hint retrieval in public API.
- Enhanced user profile management to allow updating of password hint.
- Added UI components for displaying and editing password hint.
- Updated localization files for new password hint strings.
- Improved rate limiting for sensitive public requests.
- Adjusted database schema to accommodate master password hint.
This commit is contained in:
shuaiplus
2026-03-19 00:38:56 +08:00
parent 8bc43b8f0c
commit facd0ea5f7
26 changed files with 460 additions and 26 deletions
+3 -2
View File
@@ -149,8 +149,7 @@ export function readInitialAppBootstrapState(): InitialAppBootstrapState {
};
}
export async function bootstrapAppSession(): Promise<BootstrapAppResult> {
const initial = readInitialAppBootstrapState();
export async function bootstrapAppSession(initial: InitialAppBootstrapState = readInitialAppBootstrapState()): Promise<BootstrapAppResult> {
const defaultKdfIterations = initial.defaultKdfIterations;
const jwtWarning = initial.jwtWarning;
@@ -309,6 +308,7 @@ export async function performRegistration(args: {
email: string;
name: string;
password: string;
masterPasswordHint: string;
inviteCode: string;
fallbackIterations: number;
}) {
@@ -316,6 +316,7 @@ export async function performRegistration(args: {
email: args.email.trim().toLowerCase(),
name: args.name.trim(),
password: args.password,
masterPasswordHint: args.masterPasswordHint.trim(),
inviteCode: args.inviteCode.trim(),
fallbackIterations: args.fallbackIterations,
});