Here i created the account in google developer console and create OAuth2.0 for android and downloaded the secret Json file.
Firstly I’m confusion on how i use that secret Json file.
-
google_auth:
credentials_json: ./data/google_auth.json
-
google_auth:
credentials_json: |
{
“installed”: {
“client_id”: " ",
“project_id”: " ",
“auth_uri”: " ",
“token_uri”: " ",
“auth_provider_x509_cert_url”: " "
}
}
and on unity side why i get the
please help if you about this issue
Hello @developerdinno,
The credentials_json
value should be the json itself, option 2. is the correct one (assuming it’s formatted correctly and you’re using a .yaml configuration file).
yes sir IM using on YML file thank you
hello @sesposito sir,
i keep the above configuration but i get
{"level":"info","ts":"2024-03-20T04:49:51.950Z","caller":"server/core_authenticate.go:630","msg":"Could not authenticate Google profile.","error":"google id token invalid"}
i try the credentials_json as option 2 and this way:
credentials_json: '{"web": {"client_id": "","project_id": "","auth_uri": "https://accounts.google.com/o/oauth2/auth","token_uri": "https://oauth2.googleapis.com/token","auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs","client_secret": ""}}'
any ideas or solution why this occurs
and on unity
PlayGamesPlatform.Instance.RequestServerSideAccess(true, RequestServerSideAccess);
private void RequestServerSideAccess(string code){
NakamaConnector.AuthenticateWithGoogle(code, authenticatevar);
}
Solved
i update the nakama version
and above option 2 is correct of JSON.
image: registry.heroiclabs.com/heroiclabs/nakama:3.21.0