Skip to content

Commit

Permalink
chore(demo): use invisible reCAPTCHA site key in the example
Browse files Browse the repository at this point in the history
  • Loading branch information
DethAriel committed Dec 5, 2022
1 parent a39fb1f commit e41e89a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from "ng-recaptcha";

import { parseLangFromHref } from "../../parse-lang-from-href";
import { VAL_RECAPTCHA_SITE_KEY_V3, VAL_RECAPTCHA_SITE_KEY_V2 } from "../site-key";
import { VAL_RECAPTCHA_SITE_KEY_V3, VAL_RECAPTCHA_SITE_KEY_V2_INVISIBLE } from "../site-key";
import { InvisibleDemoComponent } from "./invisible-demo.component";
import { settings } from "./invisible-demo.data";

Expand All @@ -33,7 +33,7 @@ const routes: Routes = [
},
{
provide: RECAPTCHA_SETTINGS,
useValue: { siteKey: VAL_RECAPTCHA_SITE_KEY_V2 } as RecaptchaSettings,
useValue: { siteKey: VAL_RECAPTCHA_SITE_KEY_V2_INVISIBLE } as RecaptchaSettings,
},
{ provide: RECAPTCHA_LANGUAGE, useValue: parseLangFromHref() },
],
Expand Down
8 changes: 7 additions & 1 deletion projects/demo/src/app/examples/site-key.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import { environment } from "../../environments/environment";

const TESTING_KEY = "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI";

export const VAL_RECAPTCHA_SITE_KEY_V2 = environment.production
? "6LcOuyYTAAAAAHTjFuqhA52fmfJ_j5iFk5PsfXaU"
: "6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI";
: TESTING_KEY;

export const VAL_RECAPTCHA_SITE_KEY_V2_INVISIBLE = environment.production
? "6Ldp0xgUAAAAAF_iIss_hpFaVrjLbPGjwyfJwebB"
: TESTING_KEY;

export const VAL_RECAPTCHA_SITE_KEY_V3 = "6LeGCZAUAAAAADuhzcuvSB-lYDsxJBl9HUWtZkUM";
2 changes: 2 additions & 0 deletions projects/demo/src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="preconnect" href="https://www.google.com" />
<link rel="preconnect" href="https://www.gstatic.com" crossorigin />
<link rel="icon" type="image/x-icon" href="favicon.ico" />
</head>
<body>
Expand Down

0 comments on commit e41e89a

Please sign in to comment.