при попытке отправки телефона выдает следующую ошибку:
Failed to load resource: the server responded with a status of 400 ()
код:
const generateRecaptcha = () => {
//@ts-ignore
window.recaptchaVerifier = new RecaptchaVerifier('sign-in-button', {
'size': 'invisible',
'callback': (response: any) => {
// reCAPTCHA solved, allow signInWithPhoneNumber.
onSignInSubmit();
}
}, auth);
}
const onSubmit: SubmitHandler<PasswordRecoveryInterface> = (data) => {
const phoneNumber = "+79523661409"
generateRecaptcha()
// @ts-ignore
let appVerifier = window.recaptchaVerifier
signInWithPhoneNumber(auth, phoneNumber, appVerifier)
.then((confirmationResult) => {
//@ts-ignore
window.confirmationResult = confirmationResult;
}).catch((error) => {
//@ts-ignore
grecaptcha.reset(window.recaptchaWidgetId);
console.log(error)
});
};
что делать?