admin管理员组文章数量:1415684
I'm trying to make Email verification on my react-native app. Signup works only on back-end part, so I just need to verify emails for signed up users. Here is my code
firebase.auth().signInWithEmailAndPassword(email, password)
.then((returnedUser) => {
let user = firebase.auth().currentUser;
console.log(user);
user.sendEmailVerification()
.then(function(response) {
console.log('email', response);
})
.catch(function(error) {
console.log('error', error)
});
})
.catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
if (errorCode === 'auth/wrong-password') {
alert('Wrong password.');
} else {
alert(errorMessage);
}
});
I'm trying to make Email verification on my react-native app. Signup works only on back-end part, so I just need to verify emails for signed up users. Here is my code
firebase.auth().signInWithEmailAndPassword(email, password)
.then((returnedUser) => {
let user = firebase.auth().currentUser;
console.log(user);
user.sendEmailVerification()
.then(function(response) {
console.log('email', response);
})
.catch(function(error) {
console.log('error', error)
});
})
.catch(function(error) {
var errorCode = error.code;
var errorMessage = error.message;
if (errorCode === 'auth/wrong-password') {
alert('Wrong password.');
} else {
alert(errorMessage);
}
});
I get an error "We have blocked all requests from this device due to unusual activity. Try again later." Seems like it's bad to have Firebase promise inside another one Promise, but I don't know how to resolve it without two Promises, anyone can help me?
Share Improve this question edited Jun 18, 2019 at 19:33 Frank van Puffelen 601k85 gold badges890 silver badges860 bronze badges asked Jun 18, 2019 at 18:44 Sergey SerdukSergey Serduk 1131 silver badge9 bronze badges2 Answers
Reset to default 2You are sending the email verification too many times to the same user within a short internal of time. You may want to wait a minute or so before you resend a verification link to the same user. Sometimes, emails are delayed.
it was fixed without any fixes :) Seems like my IP was blocked by Firebase servers for several days, it works ok now
本文标签:
版权声明:本文标题:javascript - Firebase always returned "We have blocked all requests from this device due to unusual activity. Try again 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745236275a2649055.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论