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.
Parameters
Section titled “Parameters”client
Section titled “client”WalletDaemonClient
options?
Section titled “options?”Returns
Section titled “Returns”Promise<string>
The JWT auth token.
Throws
Section titled “Throws”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.