feat(extension): update devices UI for new auth model
- Show revoked devices in collapsible section with strikethrough styling - Fetch revoked.json via new list_revoked message + router case - Registration flow uses register_device WASM API (private keys internal) - Display revoked_by and timestamp for each revoked entry - Update setup wizard to use new register_device API Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1049,12 +1049,12 @@ function attachStep5(): void {
|
||||
|
||||
try {
|
||||
const w = await loadWasm();
|
||||
const keypair = w.generate_device_keypair();
|
||||
// register_device keeps private keys internal — only public keys returned
|
||||
const keypair = w.register_device(state.deviceName);
|
||||
|
||||
// 1) Save private key + name locally.
|
||||
// 1) Save device name locally (private keys stay in WASM memory).
|
||||
await chrome.storage.local.set({
|
||||
device_name: state.deviceName,
|
||||
device_private_key: keypair.private_key_base64,
|
||||
});
|
||||
|
||||
// 2) Save vault config + reference image to extension storage.
|
||||
@@ -1086,7 +1086,7 @@ function attachStep5(): void {
|
||||
const host = createGitHost(state.hostType, hostUrl, state.repoPath, state.apiToken);
|
||||
await addDevice(host, {
|
||||
name: state.deviceName,
|
||||
public_key: keypair.public_key_hex,
|
||||
public_key: keypair.signing_public_key,
|
||||
added_at: Math.floor(Date.now() / 1000),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user