@dotrino/identity 0.74.0 → 0.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/vault/remote.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dotrino/identity",
3
- "version": "0.74.0",
3
+ "version": "0.74.1",
4
4
  "description": "Identidad y rating de usuarios compartidos entre apps de Dotrino (vault iframe + postMessage)",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/vault/remote.js CHANGED
@@ -366,8 +366,12 @@ export async function requestDevices ({ master, proxy, device, cert, sinceSeq, o
366
366
  */
367
367
  export async function requestRenew ({ master, proxy, device, cert, onRevoked } = {}) {
368
368
  const res = await vaultRpc({ master, proxy, device, cert, onRevoked, sendType: 'vault.renew', okType: 'vault.renewed', data: { op: 'renew' } })
369
- if (!res.cert || res.cert.sub !== device.publickey || res.cert.iss !== master) throw new Error('invalid renewed cert')
370
- return { cert: res.cert }
369
+ if (!res.cert || res.cert.sub !== device.publickey) throw new Error('invalid renewed cert')
370
+ // EL ACTA VIAJA CON EL PAPEL y hay que dejarla pasar: quien lo recibe la necesita para
371
+ // comprobar que lo firmó una SELLADORA de este perfil. Aquí se comparaba `cert.iss` con
372
+ // la maestra y se tiraba el acta, así que arriba no había con qué juzgar y la renovación
373
+ // fallaba con «the vault did not send its record» — con el papel correcto en la mano.
374
+ return { cert: res.cert, acta: res.acta || null }
371
375
  }
372
376
 
373
377
  /**