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.​
1
var configAuthRequest = {
2
// Required config
3
ApiKeyID: "<your-api-key-id>",
4
Identifier: "<your-user-email-or-phone>",
5
IdentifierType: "EMAIL", // or PHONE
6
UserID: "<your-user-id>",
7
OnSuccess: payload => {
8
console.log(payload);
9
if (payload.approved) {
10
setTimeout(() => {
11
console.log("hel");
12
}, 3000);
13
// window.location.href = "/";
14
}
15
}
16
//------
17
18
// Allow OTP fallback for Trusted Device
19
AllowOTPFallback: true,
20
21
// Styling
22
ButtonBackgroundColor: "#000000",
23
ButtonTextColor: "#ffffff",
24
ErrorColor: "#ff0000",
25
AccentColor: "#fff000",
26
ButtonText: "Authenticate",
27
28
// Change the prompt message
29
AuthRequestText: {
30
title: "Approve this login from your phone",
31
subtitle: "A notification is sent to your trusted device to confirm it's you",
32
image: "https://yourwebsite.com/image.png",
33
titleError: "Something went wrong",
34
subtitleError: "We are unable to confirm it's you, please try again",
35
imageError: "https://yourwebsite.com/image.png",
36
imageSuccess: "https://yourwebsite.com/image.png",
37
switchOTPText: "Authenticate with OTP instead"
38
},
39
40
// Event Name in the Event Response
41
EventName: "TRANSACTION",
42
};
Copied!
Read the specifications for each of these attributes in the config for Login Form.
Last modified 1yr ago
Copy link