2.2.1 • Published 3 years ago

@hiveid/verify-js v2.2.1

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

Verify Web SDK

Browser

const applicationKey = "application key";
const customerId = "customer id";

const verificationBtn = document.getElementById("verification-btn");
const verificationContainer = document.getElementById("verification-container");

Verify.configure(applicationKey, {
  language: "en", // supported de, en, es, fr
  languageSelector: true, // default true
  mode: "modal", // modal (default) | inline
});

const handleVerificationCompleted = (payload) => {
  createCheck({ sessionId: payload.sessionId });
};

const handleVerificationCanceled = () => {
  console.log("Verification canceled");
};

const handleStartVerification = async () => {
  const sessionToken = await createSession({
    customerId,
    applicationKey,
  });

  Verify.mount(verificationContainer, sessionToken);
};

Verify.on("completed", handleVerificationCompleted);
Verify.on("canceled", handleVerificationCanceled);
verificationBtn.addEventListener("click", handleStartVerification);
2.2.1

3 years ago

2.2.0

3 years ago

2.1.0

3 years ago

2.0.4

3 years ago

2.0.3

4 years ago

2.0.2

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.6

4 years ago

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.0

4 years ago

1.0.1

4 years ago