Hi all,
Hopefully someone can point me in the right direction here, I'm attempting to log into Playfab using the auth code retrieved from an async call, the flow is as follows:
1. Click login to google.
2. Unity begins to listen for the response and opens a google login browser session.
3. User clicks email/signs into email they want.
4. This response is returned to Unity with an auth code.
5. I have then attempted to use:
PlayFabClientAPI.LoginWithGoogleAccount(new LoginWithGoogleAccountRequest() { TitleId = PlayFabSettings.TitleId, ServerAuthCode = returnedWindowsGoogleAuthCode, CreateAccount = true, }, OnPlayfabGooglePlayAuthComplete, OnPlayfabGooglePlayAuthFailed);
6. This then fails with "invalidGoogleToken"
Now from what I've read across previous users is that this token is basically "used" by the time I am calling LoginWithGoogleAccount? Is this either the wrong approach by calling this after? (I feel I'm super close with this)
If I were to get the email back in the original response would I just be able to pass through to a different method to complete the login to Playfab?
To give you an idea of (nearly the exact code but altered to work in Unity)
Link:-> Googles Desktop Sample Main Code Chunk
The method "button_Click" is ran which fires the request, Unity begins listening for the google response at line 72, the auth code is then output to logs at line 129, this auth code is what I have then been passing in to LoginWithGoogleAccount which then results in the fail, this then runs a request for user information so as an alternative if I managed to get the email back in this response is there another method I can use with the email to log the user in?
I know this was alot but thanks in advance!