-
+
{text}
{signUpButton}
{signInButton}
@@ -51,7 +50,7 @@ interface ButtonProps {
const SignInButton = (props: ButtonProps) => {
return (
-
+
);
}
diff --git a/packages/login/src/components/RegistrationPage.tsx b/packages/login/src/components/RegistrationPage.tsx
index a1b98518..88fefc6f 100644
--- a/packages/login/src/components/RegistrationPage.tsx
+++ b/packages/login/src/components/RegistrationPage.tsx
@@ -39,11 +39,26 @@ const RegistrationForm = () => {
const [lastName, setLastname] = useState("")
const [firstname, setFirstname] = useState("");
const [password, setPassword] = useState("");
+ const [recaptchaToken, setRecaptchaToken] = useState(undefined);
const [recaptcha, setRecaptcha] = useState(undefined);
const [errorMsg, setErrorMsg] = useState(undefined);
+
+
const history = useHistory();
const intl = useIntl();
+
+ const verifyCallback = (recaptchaToken:string) => {
+ // Here you will get the final recaptchaToken!!!
+ console.log(recaptchaToken, "<= your recaptcha token");
+ setRecaptchaToken(recaptchaToken);
+ }
+
+ const updateToken = () => {
+ // you will get a new token in verifyCallback
+ recaptcha.execute();
+ }
+
const handleSubmit = async (event: React.FormEvent) => {
event.preventDefault();
@@ -54,7 +69,7 @@ const RegistrationForm = () => {
firstName: firstname,
lastName: lastName,
password: password,
- recaptcha: recaptcha
+ recaptcha: recaptchaToken
}
);
@@ -75,8 +90,6 @@ const RegistrationForm = () => {
});
}
-
-
return (
@@ -93,9 +106,10 @@ const RegistrationForm = () => {
+ na/>
diff --git a/packages/login/webpack.config.js b/packages/login/webpack.config.js
index b6b4ec72..1849ee9e 100644
--- a/packages/login/webpack.config.js
+++ b/packages/login/webpack.config.js
@@ -55,6 +55,6 @@ module.exports = {
contentBase: path.join(__dirname, 'dist'),
compress: true,
port: 3000,
- hot: true,
+ hot: true
}
}
\ No newline at end of file