siarashield_workspace 0.0.17 → 0.0.19
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 +11 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,16 +25,19 @@ Get your public/private keys from <a href="https://mycybersiara.com" target="_bl
|
|
|
25
25
|
- **Frontend (Angular):** public key only
|
|
26
26
|
- **Backend (.env):** private key only (never expose in frontend)
|
|
27
27
|
|
|
28
|
-
Frontend should read public key from
|
|
28
|
+
Frontend should read public key from `environment` or your environment file.
|
|
29
29
|
|
|
30
|
-
Example
|
|
30
|
+
Example `environment` values:
|
|
31
|
+
|
|
32
|
+
```environment
|
|
33
|
+
{
|
|
34
|
+
siaraShieldPublicKey:"YOUR-PUBLIC-KEY",
|
|
35
|
+
siaraShieldPrivateKey:"YOUR-PRIVATE-KEY"
|
|
36
|
+
}
|
|
31
37
|
|
|
32
|
-
```env
|
|
33
|
-
SIARASHIELD_PUBLIC_KEY=YOUR-PUBLIC-KEY
|
|
34
|
-
SIARASHIELD_PRIVATE_KEY=YOUR-PRIVATE-KEY
|
|
35
38
|
```
|
|
36
39
|
|
|
37
|
-
If your frontend project already uses
|
|
40
|
+
If your frontend project already uses `environment`, that is fine. Map it to the same public key value used in Angular config.
|
|
38
41
|
|
|
39
42
|
## 4) Add captcha container in template
|
|
40
43
|
|
|
@@ -42,7 +45,7 @@ If your frontend project already uses `.env`, that is fine. Map it to the same p
|
|
|
42
45
|
<div class="SiaraShield"></div>
|
|
43
46
|
```
|
|
44
47
|
|
|
45
|
-
In your submit button, make sure to add this class:
|
|
48
|
+
In your submit button, make sure to add this class:CaptchaSubmit
|
|
46
49
|
|
|
47
50
|
```html
|
|
48
51
|
<button class="CaptchaSubmit"></button>
|
|
@@ -64,7 +67,7 @@ export class FormComponent implements OnInit {
|
|
|
64
67
|
|
|
65
68
|
initializeCaptcha() {
|
|
66
69
|
initSiaraShield({
|
|
67
|
-
publicKey: environment.
|
|
70
|
+
publicKey: environment.siaraShieldPublicKey,
|
|
68
71
|
// If your project does NOT use jQuery, set this to true.
|
|
69
72
|
// Default is false, so package jQuery will not load.
|
|
70
73
|
loadJQuery: false,
|