Commit ece6b65d authored by adadachao's avatar adadachao

AuthModalScreenConnectWallet fetchProtectedResource up -- Invalid reCAPTCHA response

parent 9d8f146f
...@@ -35,7 +35,15 @@ const AuthModalScreenConnectWallet = ({ onSuccess, onError, isAuth, source, logi ...@@ -35,7 +35,15 @@ const AuthModalScreenConnectWallet = ({ onSuccess, onError, isAuth, source, logi
onError: handleSignInError, onError: handleSignInError,
source, source,
isAuth, isAuth,
fetchProtectedResource: recaptcha.fetchProtectedResource, // fetchProtectedResource: recaptcha.fetchProtectedResource,
fetchProtectedResource: React.useCallback(async(fetcher) => {
// Ensure initial token is present for endpoints that always require reCAPTCHA
const token = await recaptcha.executeAsync();
if (!token) {
throw new Error('ReCaptcha is not solved');
}
return recaptcha.fetchProtectedResource(fetcher, token);
}, [ recaptcha ]),
loginToRewards, loginToRewards,
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment