@soyio/soyio-widget 1.0.12 → 1.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,10 @@ Integrate the widget into your frontend framework using the script below. Ensure
|
|
|
31
31
|
### 1. Validation attempt
|
|
32
32
|
|
|
33
33
|
```html
|
|
34
|
+
<button id="start-validation-attempt">
|
|
35
|
+
Start validation attempt
|
|
36
|
+
</button>
|
|
37
|
+
|
|
34
38
|
<script>
|
|
35
39
|
import { SoyioWidget } from "@soyio/soyio-widget";
|
|
36
40
|
|
|
@@ -49,10 +53,14 @@ Integrate the widget into your frontend framework using the script below. Ensure
|
|
|
49
53
|
isSandbox: true,
|
|
50
54
|
};
|
|
51
55
|
|
|
52
|
-
//
|
|
53
|
-
|
|
56
|
+
// Function to create the widget
|
|
57
|
+
function initWidget() {
|
|
54
58
|
new SoyioWidget(widgetConfig);
|
|
55
|
-
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Add event listener to the button to create the widget on click
|
|
62
|
+
document.getElementById('start-validation-attempt')
|
|
63
|
+
.addEventListener('click', initWidget);
|
|
56
64
|
</script>
|
|
57
65
|
```
|
|
58
66
|
|
|
@@ -66,6 +74,10 @@ Optional props:
|
|
|
66
74
|
### 2. Auth attempt
|
|
67
75
|
|
|
68
76
|
```html
|
|
77
|
+
<button id="start-auth-attempt">
|
|
78
|
+
Start auth attempt
|
|
79
|
+
</button>
|
|
80
|
+
|
|
69
81
|
<script>
|
|
70
82
|
import { SoyioWidget } from "@soyio/soyio-widget";
|
|
71
83
|
|
|
@@ -83,10 +95,14 @@ Optional props:
|
|
|
83
95
|
isSandbox: true,
|
|
84
96
|
};
|
|
85
97
|
|
|
86
|
-
//
|
|
87
|
-
|
|
98
|
+
// Function to create the widget
|
|
99
|
+
function initWidget() {
|
|
88
100
|
new SoyioWidget(widgetConfig);
|
|
89
|
-
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
// Add event listener to the button to create the widget on click
|
|
104
|
+
document.getElementById('start-auth-attempt')
|
|
105
|
+
.addEventListener('click', initWidget);
|
|
90
106
|
</script>
|
|
91
107
|
```
|
|
92
108
|
|
|
@@ -99,6 +115,10 @@ Optional props:
|
|
|
99
115
|
### 3. Signature attempt
|
|
100
116
|
|
|
101
117
|
```html
|
|
118
|
+
<button id="start-auth-attempt">
|
|
119
|
+
Start signature attempt
|
|
120
|
+
</button>
|
|
121
|
+
|
|
102
122
|
<script>
|
|
103
123
|
import { SoyioWidget } from "@soyio/soyio-widget";
|
|
104
124
|
|
|
@@ -114,10 +134,14 @@ Optional props:
|
|
|
114
134
|
isSandbox: true,
|
|
115
135
|
};
|
|
116
136
|
|
|
117
|
-
//
|
|
118
|
-
|
|
137
|
+
// Function to create the widget
|
|
138
|
+
function initWidget() {
|
|
119
139
|
new SoyioWidget(widgetConfig);
|
|
120
|
-
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// Add event listener to the button to create the widget on click
|
|
143
|
+
document.getElementById('start-auth-attempt')
|
|
144
|
+
.addEventListener('click', initWidget);
|
|
121
145
|
</script>
|
|
122
146
|
```
|
|
123
147
|
|