Skip to main content

Svelte

Integrating ezto verify's Web SDK into your Svelte project is simple and efficient. Follow these steps to include the necessary files and initiate the verification process within your Svelte application.

Implement the SDK in Component

Set up your Svelte component to utilize the ezto verify SDK:

javascript

<div>
<button on:click={webSDKRequest}>Start verification</button>
</div>

<script>
const webSDKRequest = () => {
const ez = new eztoverify();
const metadata = {
request: /* request body of transaction */,
};
const cnfg = {
api: "{{base_url}}/auth/realms/api/ezto_web_push/{{appId}}/{{workspaceName}}/register"
};
ez.request(metadata, cnfg, callback);
}

const callback = (response) => {
console.log('Response:', response);
};
</script>