Skip to content

authenticate

authenticate(client, options?): Promise<string>

Defined in: ootle-wallet-daemon-signer/src/auth.ts:61

Authenticate with the wallet daemon, automatically handling the configured auth method (“none” or “webauthn”).

For “none”, a token is requested directly. Works in both browsers and Node. For “webauthn”, the browser’s WebAuthn API is used to register or login, then the resulting credential is exchanged for a token. Browser-only — in Node, pass authToken to WalletDaemonSigner.connect({ url, authToken }) instead of calling this flow.

WalletDaemonClient

AuthOptions

Promise<string>

The JWT auth token.

if the daemon advertises an unsupported auth method, the WebAuthn flow is invoked outside a browser, the WebAuthn challenge is malformed, or the user cancels the WebAuthn prompt.