Instant Verification prevents onCodeSent() to ever be called & debugged - Firebase SMS Authentication for Android

风格不统一 提交于 2019-12-13 07:27:56

问题


In Firebase SMS Authentication for Android, I'm trying to debug the stage in which the user has to type in the Verification Code he received via SMS.

However, due to the Instant Verification, I cannot recreate this scenario on my phone anymore because the onCodeSent() event is never called again. The onVerificationCompleted() is called instead - which is GOOD for production, but it leaves me no option to debug my SMS Code Verification screen.

Unfortunately, at the moment there is no way to disable Instant Verification (waiting for @samtstern's response)...

How can I recreate that scenario again? at least for debugging?

This answer didn't help because we can't get the ForceResendingToken without triggering the onCodeSent(..), and as I said, I can't get it triggered...


回答1:


Closing this question since @samtstern has responded to me on Github, providing an alternate workaround due to the (current) lack of feature to disable Instant Verification:

That's a good point. I'll make sure to add that to the feature request internally. One workaround is to use two devices. On one device (with no SIM) enter the phone number of the other device (with a SIM). Then you'll get the code flow.




回答2:


Disabling and re-enabling the sim from settings will skip Instant verification until the next successful OTP verification.



来源:https://stackoverflow.com/questions/44974802/instant-verification-prevents-oncodesent-to-ever-be-called-debugged-fireba

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!