簡體   English   中英

MFA 的 Recaptcha 已損壞

[英]Recaptcha for MFA broken

一段時間以來,我一直在嘗試為我的用戶實施 MFA。 問題似乎是 reCAPTCHA 沒有正確觸發或呈現兩次。 有趣的部分:這段代碼曾經有效,用戶可以將短信發送到他們的手機,但現在不再有效,因此他們被鎖定在他們的用戶之外。

任何幫助將不勝感激!

 const auth = getAuth(); window.recaptchaVerifier = new RecaptchaVerifier("recaptcha-container", { size: 'invisible' }, auth) recaptchaVerifier.render().then(widgetId => { window.recaptchaVerifierId = widgetId; }) const appVerifier = window.recaptchaVerifier; // Send verification code. const phoneAuthProvider = new PhoneAuthProvider(auth); const multiFactorUser = multiFactor(auth.currentUser); const multiFactorSession = await multiFactorUser.getSession(); const phoneInfoOptions = { phoneNumber: phonenumber, session: multiFactorSession }; const verificationId = await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier); // Have also tried without line 2,3,4 // Have also tried this (also with size as string) /*window.recaptchaVerifier = new RecaptchaVerifier("recaptcha-container", { size: 'invisible', 'callback': 'response' }, auth)*/ //Im almost certain it has to do with this RecaptchaVerifier part.

找到了我的問題的答案:代碼是正確的,但我做了很多await phoneAuthProvider.verifyPhoneNumber(phoneInfoOptions, appVerifier); 用我的電話號碼打電話。 當嘗試使用我的合作伙伴電話號碼時,一切正常,沒有任何問題。 如果您對此有疑問,這里有一些有用的鏈接對我有幫助: Recaptcha verifier internal-error

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM