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. We’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. 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:
    189
    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:
    189
    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:
    24
    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:
    189
    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:
    24
    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!
     
  8. Julian-Unity3D

    Julian-Unity3D

    Unity Technologies

    Joined:
    Apr 28, 2022
    Posts:
    189
    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:
    189
    Unfortunately not just yet, but we are finalizing a tutorial. We will let you know here and in a pinned thread on the forum.
     
    Guilja and carored like this.
  11. Nivagia

    Nivagia

    Joined:
    Sep 15, 2020
    Posts:
    6
    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:
    7
    +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:
    16