- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我需要的是针对所有不同登录错误的 FirebaseAuthentication 代码的完整列表,以及所有这些错误的列表。到目前为止,我已经通过反复试验找到了一些,但不能冒错过一些的风险。
我正在使用 Firebase 简单登录来使用电子邮件/密码、facebook、twitter 以及匿名登录。显然,使用这么多登录方法,用户可能无法正确登录的原因有很多(电子邮件格式不正确、未输入密码等)。目前我正在使用这段代码:
... authenticateWithDictionary method
completion:^(NSError * error, id<PUser> user) {
if (!error) {
[self loginButtonPressed:Nil];
}
else {
[UIView alertWithTitle:bErrorTitle withError:error];
}
唯一的问题是我不再收到如下所示的错误:
**(Error Code: EMAIL_TAKEN) The specified email address is already in use.**
这很好让我知道测试中出了什么问题,但是一旦应用程序上线,我会希望单独的消息a) 看起来更整洁b) 让用户知道为什么会出现这个错误
到目前为止,通过反复试验,我得出了以下结论:
错误代码
-5 INVALID EMAIL - empty or incorrect format
-6 INVALID PASSWORD
-9 EMAIL TAKEN
一旦我有了完整的列表,我将使用 switch 语句来正确处理它们
有谁知道错误代码和错误的完整列表,这样我就可以将它们全部考虑在内,而不必考虑所有可能意味着我错过一个的选项
最佳答案
您可以在 FirebaseAuth.framework
中的 FIRAuthErrorCode
枚举下找到所有 firebase 身份验证错误代码和解释
/*
Indicates a validation error with the custom token.
*/
FIRAuthErrorCodeInvalidCustomToken = 17000,
/*
Indicates the service account and the API key belong to different projects.
*/
FIRAuthErrorCodeCustomTokenMismatch = 17002,
/*
Indicates the IDP token or requestUri is invalid.
*/
FIRAuthErrorCodeInvalidCredential = 17004,
/*
Indicates the user's account is disabled on the server.
*/
FIRAuthErrorCodeUserDisabled = 17005,
/*
Indicates the administrator disabled sign in with the specified identity provider.
*/
FIRAuthErrorCodeOperationNotAllowed = 17006,
/*
Indicates the email used to attempt a sign up is already in use.
*/
FIRAuthErrorCodeEmailAlreadyInUse = 17007,
/*
Indicates the email is invalid.
*/
FIRAuthErrorCodeInvalidEmail = 17008,
/*
Indicates the user attempted sign in with a wrong password.
*/
FIRAuthErrorCodeWrongPassword = 17009,
/*
Indicates that too many requests were made to a server method.
*/
FIRAuthErrorCodeTooManyRequests = 17010,
/*
Indicates the user account was not found.
*/
FIRAuthErrorCodeUserNotFound = 17011,
/*
Indicates account linking is required.
*/
FIRAuthErrorCodeAccountExistsWithDifferentCredential = 17012,
/*
Same enum as @c FIRAuthErrorCodeAccountExistsWithDifferentCredential ,
but with incorrect spelling. Only exists for backwards compatiblity.
*/
FIRAuthErrrorCodeAccountExistsWithDifferentCredential = 17012,
/*
Indicates the user has attemped to change email or password more than 5 minutes after
signing in.
*/
FIRAuthErrorCodeRequiresRecentLogin = 17014,
/*
Indicates an attempt to link a provider to which the account is already linked.
*/
FIRAuthErrorCodeProviderAlreadyLinked = 17015,
/*
Indicates an attempt to unlink a provider that is not linked.
*/
FIRAuthErrorCodeNoSuchProvider = 17016,
/*
Indicates user's saved auth credential is invalid, the user needs to sign in again.
*/
FIRAuthErrorCodeInvalidUserToken = 17017,
/*
Indicates a network error occurred (such as a timeout, interrupted connection, or
unreachable host). These types of errors are often recoverable with a retry. The @c
NSUnderlyingError field in the @c NSError.userInfo dictionary will contain the error
encountered.
*/
FIRAuthErrorCodeNetworkError = 17020,
/*
Indicates the saved token has expired, for example, the user may have changed account
password on another device. The user needs to sign in again on the device that made this
request.
*/
FIRAuthErrorCodeUserTokenExpired = 17021,
/*
Indicates an invalid API key was supplied in the request.
*/
FIRAuthErrorCodeInvalidAPIKey = 17023,
/*
Indicates that an attempt was made to reauthenticate with a user which is not the current
user.
*/
FIRAuthErrorCodeUserMismatch = 17024,
/*
Indicates an attempt to link with a credential that has already been linked with a
different Firebase account
*/
FIRAuthErrorCodeCredentialAlreadyInUse = 17025,
/*
Indicates an attempt to set a password that is considered too weak.
*/
FIRAuthErrorCodeWeakPassword = 17026,
/*
Indicates the App is not authorized to use Firebase Authentication with the
provided API Key.
*/
FIRAuthErrorCodeAppNotAuthorized = 17028,
/*
Indicates the OOB code is expired.
*/
FIRAuthErrorCodeExpiredActionCode = 17029,
/*
Indicates the OOB code is invalid.
*/
FIRAuthErrorCodeInvalidActionCode = 17030,
/*
Indicates that there are invalid parameters in the payload during a "send password reset
* email" attempt.
*/
FIRAuthErrorCodeInvalidMessagePayload = 17031,
/*
Indicates that the sender email is invalid during a "send password reset email" attempt.
*/
FIRAuthErrorCodeInvalidSender = 17032,
/*
Indicates that the recipient email is invalid.
*/
FIRAuthErrorCodeInvalidRecipientEmail = 17033,
/*
Indicates an error occurred while attempting to access the keychain.
*/
FIRAuthErrorCodeKeychainError = 17995,
/*
Indicates an internal error occurred.
*/
FIRAuthErrorCodeInternalError = 17999,
关于ios - Firebase 登录的授权错误列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27420176/
我刚刚设置了新的 Firebase 托管以及我的自定义域和我的网页等... 一切都很好,除了真正困扰我的是默认域: projectname.web.app projectname.firebaseap
Firebase 云消息传递和 Firebase 应用内消息传递有什么区别?它们都会向您的应用发送发生了某些事情的通知。我查看了他们的文档,这些是他们的单行描述: Firebase 云消息传递: Fi
是否有任何工具可以帮助将数据从开发迁移到登台再到生产?如果没有,是否有计划 build 它们? 我知道您可以从 Forge 导出 JSON 和导入 JSON,但这不包括授权和安全设置。 最佳答案 我们
firebase 网络应用和 firebase 托管有什么区别?据我所知,网络应用程序用于实际上只是浏览器的应用程序,并且 firebase 托管仅用于网站。 最佳答案 Firebase for We
我有两个 firebase 项目 F1 和 F2。我正在使用基于密码的身份验证来识别 F1 上的用户。我希望在 F2 中识别相同的用户。所以我正在考虑以下基于 this question 的场景: C
正在使用 firebase 云功能 构建服务器,我需要其他服务器来调用我的服务器端点。最重要的是,我需要这些调用我的服务器的第三方域进行身份验证。 问题 1:如何创建这样的服务帐户,在调用中包含服务帐
我开发了一个应用程序来测试使用 flutter 和谷歌身份验证的谷歌登录功能。该项目是一个封闭的项目,只有我可以访问它。但最近我看到有一个来自未知电子邮件 ID 的谷歌登录。用户如何在没有构建我的应用
我有 2 个存储库,一个用于 firebase 功能,另一个用于静态 firebase 托管 react 站点。他们都使用相同的firebase项目。 myfirebaseproject --- fi
背景 -我正在设置一项新功能,允许用户选择他们所在的城市,因为我的应用程序是一个公共(public)交通应用程序。我希望城市位于单独的数据库中,为此我在我的 firebase 项目中创建了一个辅助数据
我构建了一个网络平台,允许用户使用一个用户帐户注册多个网络应用程序。每个应用程序都有自己独立的 Firebase 数据库。是否可以使用 firebase 身份验证并在各种 firebase 数据库之间
在 Firebase 控制台内的 Cloud Messaging View 下,用户可以创建测试通知。此功能还允许您安排通知将发送到一个设备或一组设备的时间。 是否可以创建和发送预定 使用 Fireb
我们正在为我们最近的项目使用 firebase 平台。我们最近推出并一直在监控使用情况。 我可以在 firebase 控制台中看到 firebase 调用的总数,但找不到查看每个函数调用次数的方法。
我正在开发一个使用 Webpack 捆绑模块的 Web 应用程序。无论出于何种原因,在应用程序中引入 Firebase 都会导致 Webpack 抛出错误。当 Webpack 尝试加载 Firebas
我无法在 firebase 控制台中提交支持请求。 登录 Firebase 控制台 导航至 https://firebase.google.com/support/contact/troublesho
我安装 Firebase CLI (firebase-tools) https://github.com/firebase/firebase-tools通过此代码: curl -sL firebase
在我的应用程序中,我尝试使用Firebase crash10.2.1,但无法获得编译的好处。我不断收到消息: 'Failed to resolve:com.google.firebase:fireba
我的 firebase 应用有一个注册用户列表。这些是通过电子邮件和密码身份验证创建的。 我想将 Firebase 数据和用户列表传输到另一个 Firebase 应用。 传输 firebase 数据很
如果我将数据插入到 firebase 中的 node/a/0 中。 结果将把a视为数组a[0]。 同样,如果我在 node/a/1 中设置数据,第一个数组将变为 null "a" : [
我是 Firebase 新手,我正在尝试 Firebase 数据库规则和 Firebase 身份验证。 我尝试使用 firebase 身份验证来执行 firebase 数据库规则。 因此,我创建了一封
所以场景如下: 当我从 Firebase 存储访问文件时: 我从存储桶获取文件(.html、.png、.zip 等)(尺寸较小,不超过 2mb)。 将该文件存储在我的本地存储中,这样应用就不需要再次下
我是一名优秀的程序员,十分优秀!