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.
  2. Dismiss Notice

Question Google Play Authentication

Discussion in 'Authentication' started by targaciej, Apr 12, 2022.

  1. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    I can't give a solid date, however I have tested the new support document and can successfully say it works as intended now.

    I was over the moon when I got it working in my project and I'm sure you all will be happy too.

    However, we are doing one last internal test to confirm it. So as long as it goes through smoothly then it will likely be the end of Friday, or next week at the latest.
     
    dmax9, TheKingNuro and SF_FrankvHoof like this.
  2. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    rrahim, vuthang, grefercu and 3 others like this.
  3. TheKingNuro

    TheKingNuro

    Joined:
    Nov 13, 2021
    Posts:
    5
    Thanks! Apperantly I was doing it like mostly correct just Sha-1 key was wrong. Also it was super helpful to see which client id's go where. Thank you very much.
     
  4. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    Is there a solution for webgl login? Facebook sdk package works fine for this. Why there is not a similar package for google.
    If my game is webgl I don't need to create an app in Google Play. I just want to sign in with Google.
     
  5. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    @carored, if you'd like to login with just google instead of google play games, can you start a new thread, you can even tag me in it. That way we can keep the two separate. Thanks.
     
  6. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    Thank you Julian a made the new thread, I don't know how to tag you. here is the link https://forum.unity.com/threads/google-sign-in.1412070/
     
    Julian-Unity3D likes this.
  7. AusAdam

    AusAdam

    Joined:
    Jan 2, 2021
    Posts:
    47
    This is great and helped people get the Auth code but Most of us could already get that before...The problem is with the backend. How do you use the Auth Code in php to get the players google play id??
     
  8. vuqarahim

    vuqarahim

    Joined:
    Dec 4, 2020
    Posts:
    4
    is there still no way of signing out / switching accounts? what if a player automatically signs in with one account and wants to switch it?
     
  9. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    Google don't currently offer a sign out feature for Google play games within a game, however you could try signing out of the google play app and see if you can switch accounts that way?

    Just make sure your Authentication logic is set up correctly so that you pull the correct data for each player.
     
  10. malikaran740

    malikaran740

    Joined:
    Oct 2, 2020
    Posts:
    7
    Still not working for me
     
  11. frozenwolfstudio9

    frozenwolfstudio9

    Joined:
    Jun 7, 2023
    Posts:
    5
    any news on this matter ?
     
  12. cyberover

    cyberover

    Joined:
    Dec 10, 2021
    Posts:
    1
    I did google play and google auth with this
     
  13. Wilson9253

    Wilson9253

    Joined:
    Sep 9, 2022
    Posts:
    2
    Hello, I'm having an issue with PlayGamesPlatform.Instance.Authenticate((success) => from the LoginGooglePlayGames() method
    The line above returns me Canceled from the success variable.
    Any update on that?
     
  14. Starbox

    Starbox

    Joined:
    Sep 17, 2014
    Posts:
    428
    I concur that the whole setup is now a very complicated structure. For a contextual purpose, let it be known that I do have created both an Android and a Web app clients.
    The APK uses the following SDKs and tools:
    • GPS 0.11.01
    • Unity Authentication 2.6.1
    I'm bumping this because I'm testing an APK on a different and newer device with a different account, and I found out that the Google Play Services plugin will just no launch, connect or do anything from the device. Pressing a button that is meant to open the leaderboards does nothing either.
    The new device I'm using this on is;
    • not declared as a testing device anywhere (Unity/Google)
    • the account is not declared as a tester account (Unity/Google)
    As a matter of fact it throws a rather non-descript and absolutely unhelpful warning message in the log that looks like this:

    But the error code isn't even provided.
    The GPS plugin works on the older test device I used thus far, which is a known testing device and on which my main testing account is declared. That, whether I build & run or simply copy & paste the APK and install it directly from the device (by using a file explorer app), it does work flawlessly.

    I wouldn't be able to install that APK from the Google Play servers (using for example a special download link from the Internal release track from the Google Play Console) onto the new device because neither it or the secondary account I use on it are declared on the Google Play console (or in Unity as a matter of fact). IOW I could only expect the plugin to work on this device if it received a public release of the game (under the form of an AAB file btw, not an APK).

    As per implied in the question I cited, it may seem logical that not declaring a device and/or a tester account will somehow block any attempt at connecting to the GPS servers... if only it were consistent with other how other plugins work, because all other systems, including the payments (Unity IAP reaching the Google Play servers for purchases), do work without any issue.
    GPS seems to be one of the few, if not the only one system to be throwing road blocks during the Q&A process and preventing random Android devices from enjoying a functional GPS plugin by manually installing an APK outside of the Google Play environment.

    An equally terrible offender is how historically, the Google Play plugin went from being an asset to a package and back to being an asset, with all the funny compatibility and duplicates issues this caused.
     
  15. sb33

    sb33

    Joined:
    Sep 9, 2021
    Posts:
    3
    Hello,

    My team and I are trying to implement Google Sign-in for a Unity mobile app running on Android and IOS. All of the documentation that we found is relevant to Google Play services rather than a standard Google account. Is there any way to just authenticate using google sign in?

    any reply would help, Thanks!
     
  16. doublehitgames

    doublehitgames

    Joined:
    Mar 5, 2016
    Posts:
    90
    Hey guys, could anyone gimme some help with this?
    Im trying to use Unity Identity provider with Google Play games auth, but its not working for me, and i have no detalhed log of the why!

    Im following the Google Play tutorial from forum. I already done all steps detalhedy.
    Im try to test with Unity Editor and my phone at USB Depuration. When i test, im getting this warning Message:

    Screenshot 2023-08-26 121308.png
    And my login fail!
    Please, anyone could helpme to understand what happening here?

    I noticed in other topics that this same message is shown for users who are using different certificates in production. For example: Using a test certificate in production. But in my case, I don't have my game published to the public. I'm just trying a local test with calular on the cable. I also tested with an INTERNAL version published on the GooglePlay console, but the same problem occurs!
     
  17. doublehitgames

    doublehitgames

    Joined:
    Mar 5, 2016
    Posts:
    90
    OK. Solved. I Just Generated a new Secret and configurated the Editor Autentication with this new secret. So its working now. UHUUU!
     
  18. Ohilo

    Ohilo

    Joined:
    Jul 30, 2021
    Posts:
    10
    @Julian-Unity3D It appears Google had made a change on March 31st due to which the Official tutorial doesn't work with Play Games Services plugin v11.01. I am able to sign in to Play Game Services but the method SignInWithGooglePlayGamesAsync leads to the error as seen in the screenshot. I am desperately seeking a solution.
     

    Attached Files:

  19. Ohilo

    Ohilo

    Joined:
    Jul 30, 2021
    Posts:
    10
    Has there been any update on this?
     
  20. Ohilo

    Ohilo

    Joined:
    Jul 30, 2021
    Posts:
    10
    @Julian-Unity3D I am as commented multiple times but haven't received any response from the Unity team.
     
  21. YinZuoyu

    YinZuoyu

    Joined:
    Aug 25, 2015
    Posts:
    44
    Hi,
    I had the same problem.
    Does the secret you mentioned refer to a client secret?
    I've tried it, but it didn't work.
     

    Attached Files: