登录尝试时出现Firebase Auth内部错误 [英] Firebase Auth Internal Error on login attempt

查看:118
本文介绍了登录尝试时出现Firebase Auth内部错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们是一个使用Firebase创建和登录用户的应用.以前登录可以正常工作,但是最近,当我们尝试使用电子邮件和密码登录时,它开始提示内部错误"(如下图所示)

We are an app that uses firebase to create and sign in users. The sign in worked fine before, but recently it started giving an "Internal Error" (in the picture below) whenever we try to sign in with an email and password

我检查以确保在Firebase上启用了登录方法(电子邮件和密码)

I checked to make sure that the sign in method (email and password) was enabled on firebase

FIRAuth.auth()?.signIn(withEmail: signInEmail.text!, password: signInPassword.text!, completion: { (user, error) in
    if(error == nil) {
        print("SUCCESS: User authenticated with firebase")
        if let user = user {
            KeychainWrapper.standard.set(user.uid, forKey: KEY_UID)
            print("SUCCESS: Data saved to keychain")
        }
    } else {
        print(error?.localizedDescription)
        print("Debug Description")
        print(error.debugDescription)
    }
}

这是出现的调试说明

Optional(Error Domain=FIRAuthErrorDomain Code=17999 "An internal error has occurred, print and inspect the error details for more information." UserInfo={error_name=ERROR_INTERNAL_ERROR, NSLocalizedDescription=An internal error has occurred, print and inspect the error details for more information., NSUnderlyingError=0x2835ccbd0 {Error Domain=FIRAuthInternalErrorDomain Code=4 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={
    displayName = "";
    email = "lilhughes12@gmail.com";
    expiresIn = 3600;
    idToken ="eyJhbGciOiJSUzI1NiIsImtpZCI6IjU0OGYzZjk4N2IxNzMxOWZlZDhjZDc2ODNmNTIyNWEyOTY0YzY5OWQiLCJ0eXAiOiJKV1QifQ.eyJpc3MiOiJodHRwczovL3NlY3VyZXRva2VuLmdvb2dsZS5jb20vbXJwYXJ0eS05MTNkMiIsImF1ZCI6Im1ycGFydHktOTEzZDIiLCJhdXRoX3RpbWUiOjE1NjA2NDc2MzcsInVzZXJfaWQiOiJ3aDlDQkdCYk1uY2Rvd044aUdXRVN0bXVlMk0yIiwic3ViIjoid2g5Q0JHQmJNbmNkb3dOOGlHV0VTdG11ZTJNMiIsImlhdCI6MTU2MDY0NzYzNywiZXhwIjoxNTYwNjUxMjM3LCJlbWFpbCI6ImxpbGh1Z2hlczEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwiZmlyZWJhc2UiOnsiaWRlbnRpdGllcyI6eyJlbWFpbCI6WyJsaWxodWdoZXMxMkBnbWFpbC5jb20iXX0sInNpZ25faW5fcHJvdmlkZXIiOiJwYXNzd29yZCJ9fQ.i2qRZuZPPnxpKVN-4mWVwG8dZuTMvc10QV3MxzB_La_FBNqpBrErTPjGF9PiUSOtV60YpSFKtLTFdcS5GixvN3DCvVs8OxpGBykPyoS6c4ronm9Q0hU0nK8Mc_8Ahpkq9FZkfTGdTrVyUOM9j3gs8fhFOqa5mw-1u4mNNF_lQitt1xL2FuQeXhFNMYJm14HVxlKQh0Bxb_b7ogdjOzw1BcHsTsz0zLwWx-BTqOc6jyArCSZdTBJ4x-bgSl1m-JxinOUiTMATUdB9hnXRMZEUfd1s6hL6EvpZsT95Yxfgnu8sx1yOTbApRmNYR6TGDZjXDTjpY0mUqP-_YWD7V1yY4g";
    kind = "identitytoolkit#SignInWithPasswordResponse";
    localId = wh9CBGBbMncdowN8iGWEStmue2M2;
    refreshToken = "AEu4IL0vI7r7MpOLHLKNYUP8EH1i85KB8NUUA4PXSkYBa8Gmf7HhW77tqAU1aL3_zlPRdcIqrQR023l-X7mCoZe8MYgabwBXb9q9z23j7UtPAwk4QMNByOg97xqaNLejucqAXEDS2LkrvL1Ql58E1fDme4DdY4767kKj3ITrunym9HlbgVjBY4xJMZZyAS8tCFeMI8DQoEkJaNw5s_Wjs7bAejLfTjxjHw";
    registered = 1;
    }}}})

推荐答案

基于您提供的有限代码,您似乎正在使用Firebase版本3.11.0和FirebaseAuth版本3.1.1.从Firebase的最新更新开始,使用电子邮件登录"功能不再起作用.为了解决此问题,您将必须将Firebase和FirebaseAuth更新到其最新版本(分别为6.2.0和6.1.1).

Based on the limited code you provided, it looks like you are using Firebase version 3.11.0 and FirebaseAuth version 3.1.1. As of the most recent update to Firebase, the Sign In With Email function is no longer functional. In order to resolve this issue, you are going to have to update Firebase and FirebaseAuth to their latest versions (6.2.0 and 6.1.1 respectively).

为了更新您的Pod,请在终端中转到您的项目文件夹,然后键入 pod update .此过程可能需要几分钟(取决于您的计算机和连接性).在更新您的Pod之后,请解决所有编译错误,您应该已经准备就绪!

In order to update your pods, go to your project folder in terminal and type pod update. This process may take a few minutes (depending on your computer and connectivity). After your pods have been updated, resolve all the compilation errors and you should be all set!

希望这会有所帮助!

这篇关于登录尝试时出现Firebase Auth内部错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆