You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the interest of user experience, our application persists the wallet session using `localStorage` to attempt silent auto-reconnects on page reloads.
5
+
6
+
**Important Security Implications:**
7
+
1.**Never Store Secrets:** We only persist the `walletType` and the `publicKey` (Stellar Address) in localStorage.
8
+
2.**Never** store seed phrases, private keys, or signed transactions in local storage or sessionStorage, as these are vulnerable to XSS (Cross-Site Scripting) attacks.
9
+
3.**Public Nature of Addresses:** A public key is not secret. Storing it in localStorage merely indicates which account the user was last trying to connect with.
10
+
4.**Validation on Reconnect:** During silent reconnect (`app mount`), the app queries the wallet extension or kit for the active address. We explicitly validate that the returned address matches the persisted public key. If there is a mismatch (e.g., the user switched accounts in their wallet extension), the session is cleared to prevent impersonation bugs.
11
+
12
+
By enforcing these constraints, we ensure a smooth UX without compromising the user's private keys or allowing incorrect application states.
0 commit comments