Skip to content

IdP registration flow doesn't pass provisionKeys to createPodStructure #454

Description

@melvincarvalho

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

  1. Add request.provisionKeys = provisionKeysEnabled to the request decoration block in server.js
  2. Pass { provisionKeys: request.provisionKeys } as the options argument in interactions.js:535

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions