【问题标题】:Where i can find all the error codes for [ firebase_auth: ^1.0.1 ]我在哪里可以找到 [ firebase_auth: ^1.0.1 ] 的所有错误代码
【发布时间】:2021-07-13 22:24:17
【问题描述】:

是否有任何可用的文档,其中提供了与firebase_auth 相关的所有错误代码。 我正在使用firebaseflutter,我已经完成了我的研究,找不到任何可以找到flutter 的所有错误代码的好的来源。

例如: 在密码错误时,代码是错误密码

} on FirebaseAuthException catch (e) {

      //i am talking specifically about this code
      return e.code;

    } catch (e) {
      debugPrint(e.toString());
      return 0;
    }

不过,我发现这个文件的所有错误都出现在注释中。 https://github.com/FirebaseExtended/flutterfire/blob/6bd6cd84a624a533857105e30f85650c5c68a2f7/packages/firebase_auth/firebase_auth/lib/src/firebase_auth.dart#L426

但找不到任何可用于firebase_auth: ^1.0.1 的严格文档,其中说明了所有错误。

谢谢

【问题讨论】:

标签: firebase flutter firebase-authentication


【解决方案1】:

Flutter 在 firebase Auth 之上引入了自己的层,并通过它简单地路由 Firebase 错误。您可以在下面找到错误代码列表。

不幸的是,Flutter 目前不维护活动错误代码列表,而是尝试使用同一个处理程序捕获所有错误。

这是我能找到的错误代码列表

https://firebase.flutter.dev/docs/auth/error-handling

https://firebase.google.com/docs/reference/swift/firebaseauth/api/reference/Enums/AuthErrorCode

https://firebase.google.com/docs/auth/admin/errors

https://www.techotopia.com/index.php/Handling_Firebase_Authentication_Errors_and_Failures#FirebaseAuth_Error_Codes

如果您遇到特定错误,请随时提出其他问题。

【讨论】:

    猜你喜欢
    • 2010-11-08
    • 1970-01-01
    • 2013-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-16
    • 2011-08-31
    • 1970-01-01
    相关资源
    最近更新 更多