0

我正在尝试使用此代码登录Firebase以生成Firebase身份验证凭据。Facebook身份验证令牌未能创建Firebase身份验证

func signIn(fromViewController controller: UIViewController) -> Promise<AuthCredential> { 

     return wrap { completion in 
      self.loginManager.logIn(withReadPermissions: ["public_profile"], 
            from: controller, 
            handler:completion) 
      } 
      .then { result -> AuthCredential in 

       if result.isCancelled { 
        throw NSError.cancelledError() 
       } 

       let token = result.token! 
       return FacebookAuthProvider.credential(withAccessToken:token.tokenString) 
     } 
    } 

并获取此错误。

ERROR 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=0x6040001cb050 {Error Domain=FIRAuthInternalErrorDomain Code=3 "(null)" UserInfo={FIRAuthErrorUserInfoDeserializedResponseKey={ 
    code = 400; 
    errors =  (
       { 
      domain = global; 
      message = "Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#100) You must provide an app access token or a user access token that is an owner or developer of the app\",\"type\":\"OAuthException\",\"code\":100,\"fbtrace_id\":\"CCGlFkNF1pl\"}}"; 
      reason = invalid; 
     } 
    ); 
    message = "Unsuccessful debug_token response from Facebook: {\"error\":{\"message\":\"(#100) You must provide an app access token or a user access token that is an owner or developer of the app\",\"type\":\"OAuthException\",\"code\":100,\"fbtrace_id\":\"CCGlFkNF1pl\"}}";  
}}}} 

设置我在Facebook开发应用领域和剪切和粘贴应用程序ID和秘密密钥进入火力Facebook的身份验证设置。所以我现在很担心我可能做错了什么。

任何人都遇到过这个问题?

回答

1

是否在Firebase控制台上启用了Facebook?

在Facebook的应用程序内我的高级设置,我已经转向了“为app秘密嵌入在客户端?

打开该关闭使得它所有的工作!!!!

enter image description here

+0

你的先生,是一个钢铁般的眼睛码骑师!这解决了它。 – drekka

+1

没问题,我们很乐意提供帮助。 – aofdev