Bug
When a user registers through the browser IdP flow (POST /idp/interaction/:uid with registration), createPodStructure is called without the provisionKeys option:
// interactions.js:535
await createPodStructure(username, webId, podUri, issuer);
This means pods created via browser registration never get owner keys provisioned, even when --provision-keys / "provisionKeys": true is set in the server config.
The handleCreatePod endpoint (POST /.pods) and single-user seed path both correctly pass { provisionKeys: provisionKeysEnabled }, but the IdP registration path was missed.
Root cause
provisionKeysEnabled is not attached to the Fastify request object in the onRequest hook (server.js), so interactions.js has no way to access the config value.
Fix
- Add
request.provisionKeys = provisionKeysEnabled to the request decoration block in server.js
- Pass
{ provisionKeys: request.provisionKeys } as the options argument in interactions.js:535
Related
Bug
When a user registers through the browser IdP flow (
POST /idp/interaction/:uidwith registration),createPodStructureis called without theprovisionKeysoption:This means pods created via browser registration never get owner keys provisioned, even when
--provision-keys/"provisionKeys": trueis set in the server config.The
handleCreatePodendpoint (POST /.pods) and single-user seed path both correctly pass{ provisionKeys: provisionKeysEnabled }, but the IdP registration path was missed.Root cause
provisionKeysEnabledis not attached to the Fastify request object in theonRequesthook (server.js), sointeractions.jshas no way to access the config value.Fix
request.provisionKeys = provisionKeysEnabledto the request decoration block inserver.js{ provisionKeys: request.provisionKeys }as the options argument ininteractions.js:535Related