var configAuthRequest = {
// Required config
ApiKeyID: "<your-api-key-id>",
Identifier: "<your-user-email-or-phone>",
IdentifierType: "EMAIL", // or PHONE
UserID: "<your-user-id>",
OnSuccess: payload => {
console.log(payload);
if (payload.approved) {
setTimeout(() => {
console.log("hel");
}, 3000);
// window.location.href = "/";
}
}
//------
// Allow OTP fallback for Trusted Device
AllowOTPFallback: true,
// Styling
ButtonBackgroundColor: "#000000",
ButtonTextColor: "#ffffff",
ErrorColor: "#ff0000",
AccentColor: "#fff000",
ButtonText: "Authenticate",
// Change the prompt message
AuthRequestText: {
title: "Approve this login from your phone",
subtitle: "A notification is sent to your trusted device to confirm it's you",
image: "https://yourwebsite.com/image.png",
titleError: "Something went wrong",
subtitleError: "We are unable to confirm it's you, please try again",
imageError: "https://yourwebsite.com/image.png",
imageSuccess: "https://yourwebsite.com/image.png",
switchOTPText: "Authenticate with OTP instead"
},
// Event Name in the Event Response
EventName: "TRANSACTION",
};