Hello everyone,
I'm currently facing an issue trying to login using a Google's server auth code with the PlayFab LoginWithGoogleAccount API call, but I have this error message:
/Client/LoginWithGoogleAccount: Google API error code: invalid_grant details: Bad Request
There is a lot of steps to make Google authentication works as expected and I've already solved a lot of issues, but I don't understand what happens with this one.
This error only appears after I've linked the account to PlayFab, if I try to login to a PlayFab account linked to Google using a server auth code I've just got from the Google authentication, it works as expected.
The problem is I would like to login with a stored Google's server auth code at my game launch, and it's like the server auth code is not valid anymore when I link the Google account to PlayFab...
My actual flow looks like that:
1. The player launches the app and login with device ID
2. The player chooses to login with Google => we retrieve the server auth code
3. The player chooses to link its current PlayFab account to Google => we store the server auth code in the preferences
4. The player closes and relaunches the app
5. The app detect a Google server auth code exists and try to login using PlayFab API's LoginWithGoogleAccount => invalid_grant details: Bad Request
As said above:
- if I call LoginWithGoogleAccount after the step 2 (and a PF account is already linked to this Google account), it works.
- if I call LoginWithGoogleAccount after the step 3 it doesn't work with the same error => invalid_grant details: Bad Request
Do you know what happen?