Multi-user servers: email and invite codes at sign-up and sign-in
ci / build (ubuntu-22.04) (push) Canceled after 0s
ci / build (windows-2025) (push) Canceled after 0s
ci / deny (push) Canceled after 0s

Create account takes an email and an invite or setup code (none with open
sign-up), joins servers that already have accounts, and Settings shows the
account email (admins manage people from the web vault).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-24 07:52:08 +07:00
co-authored by Claude Opus 5.5
parent 9dd43b76e9
commit b1c98f6376
4 changed files with 62 additions and 23 deletions
+5 -4
View File
@@ -154,17 +154,18 @@ fn state(app: State<'_, App>) -> AppState {
// Argon2id takes ~0.5 s, so these run as async commands off the main thread.
/// "Create a new account": a new vault here, registered with a fresh server using its setup code.
/// "Create a new account": a new vault here, registered with the server using its setup code or an invite.
#[tauri::command]
async fn create_account(
app: State<'_, App>,
server_url: String,
pins: String,
setup_code: String,
email: String,
master_password: String,
) -> CmdResult<String> {
let master_password = Zeroizing::new(master_password);
let sk = app.sync.create_account(&server_url, sync::parse_pins(&pins), &setup_code, master_password).await;
let sk = app.sync.create_account(&server_url, sync::parse_pins(&pins), &setup_code, &email, master_password).await;
app.activity.touch();
sk.map(|s| s.to_string())
}
@@ -378,8 +379,8 @@ async fn server_setup_open(app: State<'_, App>) -> CmdResult<bool> {
}
#[tauri::command]
async fn register_server(app: State<'_, App>, setup_code: String) -> CmdResult<()> {
app.sync.register(&setup_code).await
async fn register_server(app: State<'_, App>, setup_code: String, email: String) -> CmdResult<()> {
app.sync.register(&setup_code, &email).await
}
#[tauri::command]