Partial Outageshare-external
Do I required to submit for first review before firebase can pass the access?
1

The project is a Unity mobile application. Login OAuth is integrated with firebase. Login with appleID and google account is fine. However, encountered an issue when doing Facebook login.

I can login with Facebook account and get the token. but I got the below error msg with pass the token with FacebookAuthProvider.GetCredential(fbAccessToken).

Already turned on the Facebook auth service and filled the appID with secret on Firebase. the Facebook application have not yet review completely.

The error msg :

System.AggregateException: One or more error occurred, (Bad access token: {"code":190, "message":"Invalid OAuth access token - Cannot parse access token"})

The code I process the login. Im using UniversalSDK third party library to do Facebook login and get the user login token. After that , pass the token string to firebase for credential.

UniversalSDK.Ins.Login(LoginType.FACEBOOK).OnSuccess(result =>{ string fbAccessToken = result.IdToken; string userName = result.Name; Credential credential = FacebookAuthProvider.GetCredential(fbAccessToken); notDestory.auth.SignInAndRetrieveDataWithCredentialAsync(credential).ContinueWithOnMainThread(task =>{ if (!handleFireBaseAuthError(task)) { var result = task.Result; result.User.TokenAsync(true).ContinueWithOnMainThread(task_jwt =>{ RequestHTTPServerUserInfo(task_jwt.Result, 1, () => { }); }); } }); }).OnError(result => { alert_Box.SetTypeWithDelegateCallback(Common_alert_box.AlertType.Reminder, CommonConfig.GetLangWithKey("login_facebook_failed")); });

雋雋
Asked about 2 months ago