feat: persist wallet session across page refreshes #76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature/vault-session-persistence"
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?
Summary
Currently every page refresh requires re-entering the mnemonic to log in. This PR adds seamless session persistence using the existing vault system.
How it works
Two-tier storage:
sessionStorage["vault_password"]— tab lifetime, enables silent auto-restore on page refreshlocalStorage["active_vault_session"]— cross-session vault pointer (account ID + key type, no secrets)User flows:
Changes
login.rsmain.rsuse_future, vault save prompt trigger, globalvault_saved_signalcontext, identity page vault save/remove set session indicatorsSecurity
Reused existing code
vault_load()— implemented but never called until nowvault_save(),vault_exists(),validate_vault_password()WalletState::from_mnemonic()for wallet reconstructionmodal-overlay,login-modal, etc.)Test plan
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.