Skip to content
LogoLogo

setCredentialProvider

Swap in a credential provider after construction, or remove it with undefined.

Useful when the wallet a user authenticates with is not known at the time you build the instance — a browser app, typically, where Nautilus.create runs before the user connects.

Usage

.( 
  new (.(), { 
    : 'https://wallet.example.org'
  }) 
) 

Sessions already verified stay cached.

Returns

  • Type: void

Parameters

credentials

  • Type: CredentialProvider | undefined

Any implementation of the interface, e.g. WaltIdCredentialProvider for a walt.id wallet. It is asked only for services whose SSIpolicy asks for credentials: nautilus opens the policy-server session of an address-gated service without one. undefined removes the provider: a service that asks for a presentation is then refused before anything is spent.