VAPP-12: Logout and own-password change #18
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/logout-password-change-vapp-12"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
VAPP-12: Logout and own-password change
Adds the two missing self-service auth flows: signing out, and changing your own password.
Server functions (
src/server_fns/mod.rs)logout()- best-effortPOST /logoutto vervain-server with the session forwarded asmc_session(revokes the server-side session), then expires the apps-originvervain_sessioncookie viaMax-Age=0on the sameFullstackContextresponse-header pathset_session_cookieuses. The cookie clear is the authoritative sign-out on this origin, so an unreachable or unconfigured server still signs the browser out; the next page load carries no token and the shell redirects to /login.change_password(oldpass, newpass)- sends the control-channelchangepasswordaction and ack-checks the reply via the existingrequest_ackpath, so a wrong current password surfaces the server's result inline.UI
src/components/statusbar.rs): a "sign out" button next to the theme/density toggles. On click it callslogout()then navigates to /login.src/components/pages/settings.rs): the Account placeholder is replaced by a real section with a change-password form (current / new / confirm, validated the same way as the setup and user-reset forms: current required, new at least 8 chars, new matches confirm) plus a Sign out button.Acceptance criteria
/logoutrevoke + cookie expiry).changepassword, non-"ok" result surfaced inline).changepasswordhandler; UI sends the action).Verification
cargo check --features server,cargo check --target wasm32-unknown-unknown,cargo clippy --features server,cargo fmt --check, andcargo test --features server(8 passed) all clean.#VAPP-12
🤖 Generated with Claude Code