<div id="sawo-container" style="height: 300px; width: 300px"></div>
<script src="https://websdk.sawolabs.com/sawo.min.js"></script>
// Fetching payload from sessionStorage
const payload = sessionStorage.getItem("payload");
// If the payload is available, that means the user has logged in already.
// So redirecting back to "/login"
window.location.href = "/success";
// should be same as the id of the container created on 3rd step
containerID: "sawo-container",
// can be one of 'email' or 'phone_number_sms' or 'both_email_phone'
// Add the API key copied from 2nd step
// Add a callback here to handle the payload sent by sdk
onSuccess: (payload) => {
// Storing the payload in sessionStorage
sessionStorage.setItem("payload", JSON.stringify(payload));
// Redirecting to "/success"
window.location.href = "/success";
var sawo = new Sawo(config);