UserInfo
The UserInfo provides a set of methods to save, retrieve, or delete user info on authentication server.
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 userInfo = wallet.userInfo;
Examples:
Backup user Info
Backup user information to the authentication server.
const resultChallenge = await userInfo.backup({
deviceId,
loginToken,
spk,
type,
userInfoSetting,
});
Retrieve user Info
Retrieves user information from the authentication server.
const resultShares = await userInfo.retrieve({
deviceId,
loginToken,
spk,
});
Delete user Info
Deletes user information from the authentication server.
const resultShares = await userInfo.delete({
deviceId,
loginToken,
spk,
});
Associated Interface
IUserInfoLast updated