Passwords: stay unlocked when you leave the tab and come back (bw status needs the session key)
build-container / build (push) Successful in 5m17s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
nmemmertandClaude Sonnet 5.5 committed 2026-10-29 11:37:24 -04:00
1 parent 5f5d5ae214
commit 781bdef06d
1 file changed
+3 -2
+3 -2
View File
@@ -93,8 +93,9 @@ async function createSend(uid, b, key) {
} }
async function status(uid) { async function status(uid) {
let st = { status: 'unauthenticated' }; try { st = parse(await bw(uid, ['status'], { timeout: 15e3 })); } catch {} const s = sessions.get(uid); // (bw only reports "unlocked" when it is handed the session key)
const s = sessions.get(uid); let st = { status: 'unauthenticated' }; try { st = parse(await bw(uid, ['status'], { session: s && s.key, timeout: 15e3 })); } catch {}
if (s && st.status === 'unlocked') s.last = Date.now(); // coming back to the tab counts as using the vault
return { enabled: true, url: URL_, unlocked: !!s && st.status === 'unlocked', email: st.userEmail || '', loggedIn: st.status !== 'unauthenticated' }; return { enabled: true, url: URL_, unlocked: !!s && st.status === 'unlocked', email: st.userEmail || '', loggedIn: st.status !== 'unauthenticated' };
} }