Silent login fix

iOS
Hazim Bin Ijaz 2 months ago
parent 4c3c1c7029
commit a23c6f534b

@ -141,26 +141,28 @@ public class GoogleSignInManager : MonoBehaviour
{ {
Debug.Log("Attempting Google Silent Sign-In..."); Debug.Log("Attempting Google Silent Sign-In...");
GoogleSignIn.DefaultInstance.SignInSilently().ContinueWith(task => GoogleSignIn.DefaultInstance.SignIn().ContinueWith(OnGoogleSignIn);
{
if (task.IsFaulted || task.IsCanceled) // GoogleSignIn.DefaultInstance.SignInSilently().ContinueWith(task =>
{ // {
Debug.LogWarning("Silent Sign-In failed. Showing login buttons."); // if (task.IsFaulted || task.IsCanceled)
googleSignInButton.gameObject.SetActive(true); // {
googleSignInButton.interactable = true; // Debug.LogWarning("Silent Sign-In failed. Showing login buttons.");
// googleSignInButton.gameObject.SetActive(true);
guestLoginButton.gameObject.SetActive(true); // googleSignInButton.interactable = true;
guestLoginButton.interactable = true; //
return; // guestLoginButton.gameObject.SetActive(true);
} // guestLoginButton.interactable = true;
// return;
GoogleSignInUser user = task.Result; // }
string authCode = user.AuthCode; //
SafePlayerPrefs.SetString("GoogleAuthCode", authCode); // GoogleSignInUser user = task.Result;
PlayerPrefs.Save(); // string authCode = user.AuthCode;
// SafePlayerPrefs.SetString("GoogleAuthCode", authCode);
LoginToPlayFab(authCode); // PlayerPrefs.Save();
}); //
// LoginToPlayFab(authCode);
// });
} }
private void LoginToPlayFab(string authCode) private void LoginToPlayFab(string authCode)

Loading…
Cancel
Save