AuthServerClient

The AuthServerClient provides a set of methods to interact with the authentication server.

circle-exclamation

AuthServerClient

How To Use

Import the Wallet Service:

import Wallet from '@sdk/src/services/Wallet';

Initialize the wallet and custom storage:

The custom storage is needed by Wallet SDK to check storage.

const storage = new SecureStorage();
const wallet = Wallet.create('YOUR_AUTH_SERVER_BASE_URL', storage);
const authServerClient = wallet.authServerClient;

Examples:

Get Challenge

Requests a challenge from the authentication server.

const resultChallenge = await authServerClient.getChallenge({
    deviceId,
    spk,
});

Distribute Shares

Distributes shares to the authentication server. Normally, this function is used by WalletCreation only.

Retrieve Shares

Retrieves shares from the authentication server. Normally, this function is used by WalletCreation only.

Delete Shares

Delete shares from the authentication server. Normally, this function is used when a user deletes wallet.

Associated Interface

IAuthServerClientchevron-right

Last updated