0
他のコールバックで使用するfirebase - > recaptcha(すべてロード済みで初期化済み)を再初期化する方法はありますか?firebase他のコールバックで使用するrecaptchaを再初期化
function my_recaptcha(my_success_callback,my_expired_callback){
window.recaptchaVerifier = new firebase.auth.RecaptchaVerifier('id_container_recaptcha', {
'size': 'invisible',
'callback': function(response) {
// reCAPTCHA solved, allow user to do action.
// ...
my_success_callback.call(this,arguments);
},
'expired-callback': function() {
// Response expired. Ask user to solve reCAPTCHA again.
// ...
my_expired_callback.call(this,arguments);
}
});
}
私はこの
my_recaptcha(function(){
console.log('SUCCES 1')
},function(){
console.log('EXPIRED 1')
})
my_recaptcha(function(){
console.log('SUCCES 2')
},function(){
console.log('EXPIRED 2')
})
のようないくつかをしようとした場合、私はこのエラーを得た:
Uncaught Error: ReCAPTCHA has already been rendered in this element
私は再インスタンスreCAPTCHAのためにgrecaptcha.reset(window.recaptchaWidgetId);