I'm having trouble trying to authenticate on my android game, I use playfab + google play services to authenticate on google, but I cant even reach the part where I authenticate on playfab with the google account, the Social.localUser.Authenticate
never succeeds and the message it returns in the callback is "Authentication canceled", the only useful log messages I get is
[Play Games Plugin DLL] Application is pausing, which disconnects the RTMP client. Leaving room. Authentication canceled [Play Games Plugin DLL] DEBUG: Invoking user callback on game thread
sometimes it throws
[Play Games Plugin DLL] Starting Auth Transition. Op: SIGN_IN status: ERROR_TIMEOUT
or
[Play Games Plugin DLL] Starting Auth Transition. Op: SIGN_IN status: ERROR_NOT_AUTHORIZED
but thats about it. The weirdest thing is that it opens up the Google Play Games popup, it asks for the permissions, I accept it and everything goes as it supposed to be but in the application it never succeeds. I already registered the platform addon on the Playfab, added a web app linked on the google developer console, copied the client oauth id and secret to playfab, configured the redirected uri and the endpoint link (refs.: https://www.youtube.com/watch?v=FIse9VOk-FE, https://api.playfab.com/docs/tutorials/landing-players/sign-in-with-google). But none of this works, I cant authenticate with it, wether it is installed through the playstore or not, the only thing that I have not tried yet it testing it as an alpha release on the playstore, it is on internal tests at the moment.
[Update 1:] Code I'm using on awake:
PlayGamesClientConfiguration config = new
PlayGamesClientConfiguration.Builder()
.AddOauthScope("profile")
.WithInvitationDelegate(GoogleInvitation)
.WithMatchDelegate(GoogleMatch)
.RequestEmail()
.RequestServerAuthCode(false)
.RequestIdToken()
.Build();
PlayGamesPlatform.InitializeInstance(config);
PlayGamesPlatform.DebugLogEnabled = true;
PlayGamesPlatform.Activate();
Code I'm using to login:
Social.localUser.Authenticate((success, message) =>
{
Debug.Log("Authentication Message: " + message);
if (success)
{
var serverAuthCode = PlayGamesPlatform.Instance.GetServerAuthCode();
_AuthService.AuthTicket = serverAuthCode;
_AuthService.Authenticate(Authtypes.Google);
}
else
{
Debug.Log("Failed authenticating with google");
}
});