Search Unity

Google Login for unity (NOT Google Play Games services Login)

Discussion in 'Android' started by aurodo, Dec 26, 2016.

  1. aurodo

    aurodo

    Joined:
    Nov 21, 2016
    Posts:
    6
    Hi,

    I am building an AR project and are trying to give a GOOGLE LOGIN in Unity . Although there is Google play games plugin for unity but I cannot use that because it's login show google that he is joining for a Game. (as AR is not a game)

    I tried using Google Firebase for UNity ( https://firebase.google.com/docs/auth/unity/google-signin ) but I am unable to use it. I created a plugin for Google Sign-In in Android Studio and imported it into the main project and then tried to use that plugin for Google Sign-in. It does not work.
     
    khanhabib likes this.
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Well... even if it isn't a game, you should be able to use the google play games services? Just don't implement leaderboards or achievements (I think you have to create some dummy ones anyway or it won't publish).

    Wouldn't that work?
     
    khanhabib likes this.
  3. nasa_science

    nasa_science

    Joined:
    Mar 22, 2014
    Posts:
    2
    Hi, could you solve you problem? I rrally need help with that.
    Thanks
     
    khanhabib likes this.
  4. mopsicus

    mopsicus

    Joined:
    Feb 15, 2016
    Posts:
    13
    Hi, can you share your plugin sources?
     
    khanhabib likes this.
  5. akaimos

    akaimos

    Joined:
    Oct 26, 2016
    Posts:
    1
    I'm in the same position as OP. I'm building a non-game VR app and would like to have secure Google sign-in. The Google Play Services integration with Unity is not satisfactory because it doesn't provide the necessary information to be able to securely authenticate your backend server (you can't just send the user ID because that can be spoofed). My few hours of research today seem to indicate that there is no way to do this currently via Unity?
     
    khanhabib likes this.
  6. natasha1403

    natasha1403

    Joined:
    Dec 3, 2016
    Posts:
    2
    Hi
    I have come across same problem, is there anyone who can help me with solution.

    I tried using Google Play Game Services, but the problem with that plugin is that if Play Google Games app is not there on the device, it just direct to play store and callback API is returning false, leaving users clueless as to why Google login fail. Is there a better way to implement google login?
     
  7. Lars-Blaabjerg

    Lars-Blaabjerg

    Joined:
    Apr 5, 2011
    Posts:
    54
    You can do that by sending the idtoken to your server and then validating that as described here: https://developers.google.com/identity/sign-in/web/backend-auth
    However, I have the problem that the id token is never refreshed during a session using the GooglePlayGames plugin, and it is only valid for a rather short time :-(
     
    ilmario and sathishthedna like this.
  8. KEMBL

    KEMBL

    Joined:
    Apr 16, 2009
    Posts:
    181
    khanhabib likes this.
  9. Lars-Blaabjerg

    Lars-Blaabjerg

    Joined:
    Apr 5, 2011
    Posts:
    54
  10. KonstantinosRep92

    KonstantinosRep92

    Joined:
    Nov 30, 2013
    Posts:
    2
    Can someone help with this?
    Can we use Firebase google sign in in Unity, after all?

    Thank you very much.
     
    tmalhassan and khanhabib like this.
  11. xysverma

    xysverma

    Joined:
    May 8, 2013
    Posts:
    10
    andreini likes this.
  12. tungnguyendev

    tungnguyendev

    Joined:
    Mar 26, 2014
    Posts:
    13
    You can try with this asset http://u3d.as/JR6, include Google, Facebook, Twitter authentication with Firebase.
     
  13. cenghover

    cenghover

    Joined:
    Sep 25, 2012
    Posts:
    9
    Please checkout my article on this, after suffering 2 weeks, finally I made it work like a charm and decide to publish a tutorial about this:

    https://link.medium.com/msoezkqURgb
     
  14. HarrysXR

    HarrysXR

    Joined:
    Apr 20, 2020
    Posts:
    1