Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Feature Request Google sign-in

Discussion in 'Authentication' started by carored, Mar 14, 2023.

  1. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    Hello i'm looking a way to sign in with google in Unity without using Google Play there is no package available for this. This is required for a webgl game that have a login part and users can sign in with Facebook or Google. For Facebook it works with FacebookSDK. Can you provide something similar for Google?
    All the examples use Google Play or Firebase or Playfab.
     
  2. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    Let me look into this for you
     
  3. carored

    carored

    Joined:
    Mar 21, 2018
    Posts:
    11
    Hello Julian any news on this?

    thanks for your help :)
     
    somozadev likes this.
  4. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    We're still investigating it, be assured we are on the case and I currently have been working on a possible solution.
     
    Last edited: Mar 30, 2023
    somozadev likes this.
  5. wayfarergames

    wayfarergames

    Joined:
    Sep 7, 2013
    Posts:
    26
    Also looking for info on this - there is a "google sign in" package from google that is 5 years out of date here:https://github.com/googlesamples/google-signin-unity

    It is possible to actually use this sign-in flow on iOS, you've just got to edit GoogleSignIn/Editor/GoogleSignInDependencies to change the GoogleSignIn version from >= 4.0.2 to just 4.0.2 (no >=). Trying it on Android shortly, I'll edit this post if I get it working.

    We don't need google play games sign-in, just google sign in! There are two authentication identity providers, one for "google play games sign in" and one for "google sign in" - I would've assumed that the former was specifically the google play games SDK, and the latter would be a normal "sign in with google" button (like the "sign in with apple" flow that is supported by Unity Authentication), but the docs just link back to the play games plugin: https://docs.unity.com/authentication/en/manual/set-up-google-signin
     
    Last edited: Apr 24, 2023
    Julian-Unity3D likes this.
  6. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    We're aware of the confusion with google sign in and are currently working on a support document to clear it up.

    This link you provide is actually correct: Set up a Google sign-in (unity.com) and it is Google Sign in with Google Play Games. I know it might sound a little strange but google are offering multiple ways to be able to sign in including with: Google Play Games sign in with Google Play Games, Google sign in with Google Play Games and Google sign in with Google.

    Rest assured we are working on documentation to help everyone understand which to choose and how to implement.
     
  7. wayfarergames

    wayfarergames

    Joined:
    Sep 7, 2013
    Posts:
    26
    Hmm, doing it with Google Play Games necessitates that your app is set up as a "game" on the Google Play Store, and it means there's no way to implement this on iOS - I understand that people like me that use Unity for app development are few and far between, but it would be useful to implement this without google play games!
     
    caden-burleson likes this.
  8. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    As I say we are aware of the confusion, and are working on a document for using Google sign in with Google.
     
    wayfarergames likes this.
  9. Netherzapdoss

    Netherzapdoss

    Joined:
    Dec 30, 2022
    Posts:
    3
    Is it possible to be notified when the documentation is available? I've been following the current documentations for a few days now and unfortunately was just confusing as I only want the traditional google sign-in without using google play games.
     
    Julian-Unity3D likes this.
  10. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    Unfortunately not just yet, but we are finalizing a tutorial. We will let you know here and in a pinned thread on the forum.
     
    caden-burleson, Guilja and carored like this.
  11. Nivagia

    Nivagia

    Joined:
    Sep 15, 2020
    Posts:
    7
    Any news on when the tutorial will be ready?
     
    a_yanovski, takachi_dev and Guilja like this.
  12. a_yanovski

    a_yanovski

    Joined:
    Feb 1, 2022
    Posts:
    9
    +1 on this. I have a webGL project that shows the login with the firebase web SDK: https://firebase.google.com/docs/auth/web/google-signin and the user's JWT that we get back from a successful login clearly says that the provider is google but when I pass it to AuthenticationService.Instance.SignInWithGoogleAsync, i get an error back saying the issuer is invalid. Please help :)
     
  13. chin13577

    chin13577

    Joined:
    May 8, 2017
    Posts:
    17
  14. passionpuncher

    passionpuncher

    Joined:
    Oct 26, 2020
    Posts:
    4
    +1, bump, whatever to get this going.

    We are using this as well but it feels like a dirty hack :)

    I hope the UGS team comes up with a simple solution for Google sign-in with Google as IdP for Unity Auth. I find this solution to be more cross-platform than the Play Games versions.
     
  15. MasterControlProgram

    MasterControlProgram

    Joined:
    Apr 18, 2015
    Posts:
    48
    Bump as well! Would really appreciate any additional guidance for how to implement Google SignIn for iOS and Android.
     
  16. ricpumanes

    ricpumanes

    Joined:
    Feb 3, 2018
    Posts:
    1
    bump! i have same issue
     
  17. Leonos007

    Leonos007

    Joined:
    Aug 24, 2020
    Posts:
    4
    It's ridiculous that such major functions are not natively supported by Unity.
    For Google we are for several years dependent of an 'amateur' developer who did the trick which Unity does not seem to get right.
    I did tried the huge massive way of Unity trying to get a simple GoogleID from a user.
    But after hours of trying it just will not work, although I followed every step of this huge implementation.
    Lucky I made a copy of a clean project where I can revert to, because all this Playservices SDK and Unity authentication made quite a mess.
    Hopefully someone is going to think clearly at Unity and make a simple Google Signing replacement, without importing and setting tons of things.
     
    caden-burleson likes this.
  18. KollaborateStudio

    KollaborateStudio

    Joined:
    Jun 21, 2023
    Posts:
    1
    Any updates on this matter ? im struggling with this
     
  19. MetaCamp

    MetaCamp

    Joined:
    Dec 30, 2021
    Posts:
    1
    bump! I'm waiting for new news.
     
  20. Tazyooo

    Tazyooo

    Joined:
    May 12, 2020
    Posts:
    8
    Dear @Julian-Unity3D,

    Happy New Year! Any updates on how to use Google Sign in without GPGS, Firebase etc.?
     
  21. AlmightyMikkel

    AlmightyMikkel

    Joined:
    Jun 29, 2023
    Posts:
    2
    I'll second this, its crazy that theres no warning that your documentation is outdated with wrong steps :/ Super unfortunate..
     
  22. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
    This week I just started to check how Unity Authentication works and I'm also very confused about how to put it to work without needing to use Google Play Games, since my game is supposed to run on WebGL and Standalone where I cannot have Google Play Games SDK.
     
  23. g1zeonik

    g1zeonik

    Joined:
    Aug 9, 2022
    Posts:
    4
    Any news on this?
     
  24. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    232
  25. hippogames

    hippogames

    Joined:
    Feb 5, 2015
    Posts:
    232
    The current options are:
    1) GPGS v10.14 - outdated, uses Play Games Services v1 SDK, but you can request any access scopes you need, get email and deal with id_token (JWT). Still works with latest Unity versions.
    2) GPGS v11.01 - latest, uses Play Games Services v2 SDK, but is very limited (no email, no access scopes, no JWT, it can povide only user ID and name, though it still supports PlayGamesPlatform.Instance.RequestServerSideAccess for getting used data on the server side). Still works with latest Unity versions.
    3) Google Sign-In SDK - deprecated, the unity package was updated 6 years ago. Some users said it still works.
    4) Android Credential Manager API - a new approach by Google, no support from Unity side.
    5) Use Simple Google Sign-In asset based on web oauth (no in-app dialog, users are redirected to Google website to sign in).

    So I'm joining to this request - will Unity provide a way for simple Google sign-in without Play Services?
     
    Last edited: Feb 22, 2024
    sandolkakos and stefanvedrina like this.
  26. olegpstv

    olegpstv

    Joined:
    Jul 9, 2022
    Posts:
    2
    +1 for this problem
     
    sandolkakos likes this.
  27. sandolkakos

    sandolkakos

    Joined:
    Jun 3, 2009
    Posts:
    282
  28. caden-burleson

    caden-burleson

    Joined:
    Aug 1, 2011
    Posts:
    24
    Hey @Julian-Unity3D, Noticed you aren't a support engineer as of two months ago, but could you please update this post with someone that is. So we can get some feedback as to when we can expect GOOGLE AUTH, not Google play(nobody wants).

    Thank you!
     
    Julian-Unity3D and olegpstv like this.
  29. olegpstv

    olegpstv

    Joined:
    Jul 9, 2022
    Posts:
    2
    Nobody wants google play ;)
     
  30. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    192
    Hey everyone,
    I've since changed roles and I am now working in an entirely different department. It does mean I'm not as active on the forum anymore as it is not part of my new role. You may see me occasionally on the engine side of the forums though. I do appreciate your patience on this ongoing issue.

    I am currently speaking with previous team members so that we give you the right support.

    Once again, thank you for the ongoing patience you have shown.
     
    olegpstv likes this.