Hello all! Wondering if someone can help or at least point me in the right direction, sorry if this should be posted in the /r/unity sub instead just let me know otherwise.
I currently have playfab setup on my game where you can login to facebook and google play games with playfab but google play games (GPG - I'll call it this from now on) isn't available outside of mobile so I'm trying to figure out how to get a login working with a windows build then I can work on the facebook version.
So far logging in to GPG with playfab goes something like:
//Get Auth Code var serverAuthCode = PlayGamesPlatform.Instance.GetServerAuthCode(); PlayGamesPlatform.Instance.Authenticate(PlayGamesAuthenticateResult) And PlayGamesAuthenticateResult runs PlayFabClientAPI.LoginWithGoogleAccount(new LoginWithGoogleAccountRequest() { TitleId = PlayFabSettings.TitleId, ServerAuthCode = serverAuthCode, CreateAccount = true }
Since GPG isn't available then you can't call GetServerAuthCode from the PlayGamePlatform reference to get the auth code.
Now I always thought my googlefu was pretty decent but everyone asking this question or something similar that could find ends up pointing to this link which doesn't massively answer the question:
Setting up PlayFab authentication using Google and HTML5
This shows that they still call the LoginWithGoogleAccount method but within HTML5 and instead getting the auth code from:
var accessToken = gapi.auth2.getAuthInstance().currentUser.get().getAuthResponse(true).access_token;
Sorry for being dense here but how do I go about implementing this? I wanted to set another scripting define symbol to have an "if UNITY\_WINDOWS" then login etc but does this mean there is a way to call a set bunch of HTML5 code from within my C# script to get at least the auth code or do I instead have to implement some kind of manual API plugin/method or something?
Thanks in advance! This has been doing my head in for a while now :(