Skip to content

Commit

Permalink
feat: replace recaptcha (#40)
Browse files Browse the repository at this point in the history
* update sitekey

* use enterprise

* update sitekey

---------

Co-authored-by: alpers <alpers@163.com>
  • Loading branch information
linhan and linhan-work authored Jun 16, 2023
1 parent eb4810b commit 244a8f0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react-components/src/Recaptcha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ const Recaptcha: React.FunctionComponent<Props> = ({ onCallback }) => {
script.onload = () => {
const { grecaptcha } = window as any;

grecaptcha.ready(() => {
grecaptcha.enterprise.ready(() => {
if (container.current) {
grecaptcha.render(container.current, {
grecaptcha.enterprise.render(container.current, {
callback: (response: any) => {
onCallback(response);
},
sitekey: '6LdmRHogAAAAAF9YN6bMc6hNExitqRJog3-wDkH-'
sitekey: '6LdRdHEmAAAAAB6sCexgvlzcefHetcyUF506W6Z9'
});
}
});
Expand All @@ -35,7 +35,7 @@ const Recaptcha: React.FunctionComponent<Props> = ({ onCallback }) => {
setError(error.toString());
};

script.src = 'https://www.google.com/recaptcha/api.js';
script.src = 'https://www.google.com/recaptcha/enterprise.js';

document.body.appendChild(script);
}, [onCallback]);
Expand Down

0 comments on commit 244a8f0

Please sign in to comment.