Skip to content

Offer a simpler API for interaction URLs #50

@dlongley

Description

@dlongley

Given the evolution of CHAPI and the credential space, we could probably offer a drastically simplified API for issuer/verifier coordinator websites (relying parties) to call now. For example:

// this can either resolve (to an empty object or undefined at the moment)
// or it can reject with an `AbortError` because the user canceled from the UI
// or the caller (coordinator) aborted via `signal`
await navigator.chapi.interact({interactionUrl, signal});

Optional suggestions for credential handlers (e.g., digital wallets) could still be provided:

await navigator.chapi.interact({
  interactionUrl, signal,
  recommendedHandlerOrigins: [...]
});

The above entry point would then, for now, translate into a credentialrequest event to keep compatibility with existing use of the older API. If we need to translate into credentialstore as well, we can add another parameter for the caller to signal whether they are offering any credentials or just requesting them, e.g.:

// `type: 'store'` | `type: 'request'` to be bikeshed
await navigator.chapi.interact({
  interactionUrl, signal,
  recommendedHandlerOrigins: [...], type: 'store'
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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