Firebase用户身份验证问题

时间:2017-08-03 20:11:03

标签: swift firebase

  

NSLocalizedDescription =用户未经过身份验证,请使用Firebase身份验证进行身份验证,然后重试。,ResponseErrorDomain = com.google.HTTPStatus,ResponseErrorCode = 401}

我无缘无故地收到此错误。我的应用程序在过去几周内工作得非常好,但现在突然间我得到了这个。我没有更改与登录或身份验证相关的任何事情。 firebase有问题。我达到了某种限制吗?

当我尝试从firebase查看图像时,它不再起作用了。当我尝试使用下面的代码上传图像时,我收到错误。

    static func uploadCollage(_ image: UIImage, delegate: BottomProfileViewController) {
    guard let uid = Auth.auth().currentUser?.uid else {
        print("error uploading image")
        return
    }
    let refStore = Storage.storage().reference().child("collage").child(uid + ".jpg")
    let imageData = UIImageJPEGRepresentation(image, 0.01)
    refStore.putData(imageData!, metadata: nil) { (meta, err) in
        if err != nil {
            print("error uploading image data ", err ?? "")
            return
        }
        delegate.spinner.stopAnimating()
        delegate.collage.alpha = 1
        print(meta ?? "no meta")
        let url = String(describing: (meta?.downloadURL())!)
        LoadRequests.gRef.child("Users").child(uid).child("Collage URL").setValue(url)

        RequestPageViewController.userName?.info["Collage URL"] = url
    }
}

0 个答案:

没有答案