Advanced Customization for Pop Up Authentication Prompt
The configuration for the Pop Up Prompt is using the configuration for the Login Form, so you can use the attributes explained in the Login Form.
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",
};
Read the specifications for each of these attributes in the config for Login Form.
Last updated