Verification UI for the Tanker SDK
A UI element that wraps a Tanker client in order to handle the verification process on its own. It takes the form of a modal that will appear as needed, send the verification code to the user and prompt them for said code.
Usage
This package is meant to wrap a Tanker client and start it through the VerificationUI object.
import { Tanker } from '@tanker/client-browser';
import VerificationUI from '@tanker/verification-ui';
const config = { appId: <app-id> };
const tanker = new Tanker(config);
const verificationUI = new VerificationUI(tanker);
const { email, identity, provisionalIdentity } = await myApp.getCurrentUser();
// This call will show the verification modal as required and will block until the user verifies their identity.
// `email` required, the email address to which emails will be sent to verify the user's identity
// `identity` required, the Tanker identity for the given user (generated by @tanker/identity)
// `provisionalIdentity` optional, a Tanker provisional identity that should be claimed by the user (generated by @tanker/identity). It only needs to be verified once and will be ignored if given again.
await verificationUI.start(email, identity, provisionalIdentity);
More about Tanker
Tanker's client SDKs allow for seamless integration of client-side end-to-end encryption in your application.
Tanker is available for iOS, Android, and Web apps.
Read the documentation to get started.
Go to tanker.io for more information about Tanker.