Flatter firebase电话验证错误传递了安全网令牌,但在firebase控制台中未注册匹配的sha-256
我在firebase上注册sha-1版本,调试密钥 我都做了firebase注册教程 但我在调用verifyPhoneNumber()时收到了这条消息 在验证中失败:(AuthException异常){exception.message}Flatter firebase电话验证错误传递了安全网令牌,但在firebase控制台中未注册匹配的sha-256,firebase,flutter,firebase-authentication,sha256,Firebase,Flutter,Firebase Authentication,Sha256,我在firebase上注册sha-1版本,调试密钥 我都做了firebase注册教程 但我在调用verifyPhoneNumber()时收到了这条消息 在验证中失败:(AuthException异常){exception.message} This app is not authorized to use Firebase Authentication. Please verify that the correct package name and SHA-1 are configured i
This app is not authorized to use Firebase Authentication.
Please verify that the correct package name and SHA-1 are configured
in the Firebase Console.
[ A safety_net_token was passed, but no matching SHA-256 was registered in the
Firebase console.
Please make sure that this application's packageName/SHA256 pair is registered in
the Firebase Console ]
如果我注册了sha1,我想我不需要注册SH256
但它是这样说的
这是什么原因,,
如何解决此问题???此问题的解决方案只是在Firebase控制台上注册Sha-256
❔❔ 但仍然不知道原因。解决办法是:
flatterclean
以清除项目依赖项pub get
再次获取所有依赖项那你就可以走了。这对我很有用。你找到解决方案了吗只要在firebase控制台上注册项目sha-256,然后一切正常添加sha指纹后,你必须再次下载google-services.json文件并再次将其添加到你的项目中(替换上一个)。还要仔细检查google-services.json文件中的包名是否与build.gradle中的包名或项目id相对应。e、 g.com.example.等等。。。