Google Play Games Fails Authentication in Unity Editor

My google Play Games Plugin Fails to authenticate in the editor, also does not work even when I build the game. Is it common to fail in the editor? How to make it work. Here is the code I am using.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GooglePlayGames;
using GooglePlayGames.BasicApi;

public class LeaderBoard_Setup : MonoBehaviour
{
    public static LeaderBoard_Setup Instance;
    [HideInInspector] public bool connectedToGooglePlay;
    private void Awake()
    {
        Instance = this;
        DontDestroyOnLoad(this.gameObject);
        PlayGamesPlatform.DebugLogEnabled = true;
        PlayGamesPlatform.Activate();
    }

   

    void Start()
    {
        LoginToGooglePlay(); 
    }

  void LoginToGooglePlay()
    {   PlayGamesPlatform.Instance.Authenticate(ProcessAuthentication);
    }

    void ProcessAuthentication(SignInStatus status)
    {
        if(status== SignInStatus.Success)
        {
            connectedToGooglePlay = true;
        }
        else
        {
            connectedToGooglePlay = false;
            Debug.Log("Playconsole connection fail");
        }
    }
}
1 Like

On Editor, GooglePlayGames use DummyClient to handle your request.

public class DummyClient : IPlayGamesClient
{
        public void Authenticate(Action<SignInStatus> callback)
        {
            LogUsage();
            if (callback != null)
            {
                callback(SignInStatus.Canceled);
            }
        }
}

Which is alway return Canceled immidiately.