gun icon indicating copy to clipboard operation
gun copied to clipboard

SEA Certify does not work when more than 1 pub is supplied

Open jakethejab opened this issue 4 years ago • 2 comments

I'm experiencing an issue with SEA certify. If I provide the pub of 1 user it works fine (the user is able to write to the authority user's graph). If I provide more than 1 pub, it does not work at all.

This works:

const cert = await SEA.certify(
  ['H5LBBxrb0wFukxlI9YAFif9M-LVE6JFtRwvMZCTfe54.CzOB4zTpzR3OPa7Ncf6pfOVmyXiAJp3-XohtcBgvwBw'],  // 1 pub provided
  {"*": "messages", '+': '*' },
  authorityUser.pair(),
  null
);

This doesn't:

const cert = await SEA.certify(
  ['H5LBBxrb0wFukxlI9YAFif9M-LVE6JFtRwvMZCTfe54.CzOB4zTpzR3OPa7Ncf6pfOVmyXiAJp3-XohtcBgvwBw', 'eBv261G2jBJOQzAUEb-jn6XISvRQq3rbPgLaatrC9qQ.ZUXChPYESeYFiGizTuppffBETXaBnOTAYjValT1qpsg'], // 2 pubs provided
  {"*": "messages", '+': '*' },
  authorityUser.pair(),
  null
);

When supplying more than 1 pub for the certificate, puts to the authority user's graph will silently fail, there is no acknowledgement or error message.

jakethejab avatar Sep 29 '21 14:09 jakethejab

Thanks. I'll fix this after certify block is fixed.

mimiza avatar Sep 30 '21 01:09 mimiza

This PR fixes this issue: https://github.com/amark/gun/pull/1358

mimiza avatar Jan 23 '24 09:01 mimiza