Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Bug Why "Google Play Games sign-in" authCode is the string "Success"

Discussion in 'Authentication' started by EdwardAndy, Sep 18, 2022.

  1. EdwardAndy

    EdwardAndy

    Joined:
    Jul 26, 2020
    Posts:
    20
    I use Google Play Games sign-in api:
    Code (CSharp):
    1. Social.localUser.Authenticate( (success,authCode) => {
    2.                 if (success)
    3.                 {
    4.                     debugger.Log($"Login with Google Play Games done. authCode: {authCode}, success:{success}");
    the success is true, but the authCode is the string :"Success".

    upload_2022-9-18_14-37-54.png
    upload_2022-9-18_14-38-11.png
     
  2. EdwardAndy

    EdwardAndy

    Joined:
    Jul 26, 2020
    Posts:
    20
    I found when I use "PlayGamesPlatform.Instance.RequestServerSideAccess", it works.
    Code (CSharp):
    1. Social.localUser.Authenticate( (success,authCode) => {
    2.                 if (success)
    3.                 {
    4.                     debugger.Log($"Login with Google Play Games done. authCode: {authCode}, success:{success}");
    5.                     PlayGamesPlatform.Instance.RequestServerSideAccess(true, async code => {
    6.                         debugger.Log($"PlayGamesPlatform.Instance.RequestServerSideAccess. code: {code}");
    7.                         await AuthenticationService.Instance.SignInWithGooglePlayGamesAsync(code);
    8.