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 have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Firebase Federated Identities - Signing in with Google and Facebook

Discussion in 'Scripting' started by LuKenn, Jan 8, 2017.

  1. LuKenn

    LuKenn

    Joined:
    Jun 25, 2016
    Posts:
    2
    Hi,

    I've been trying to get Firebase to allow Google and Facebook logins, but I'm kinda stuck.

    What I've done :
    1. Imported the Firebase SDK, Google Play Games SDK.
    2. Created Firebase project, added Google Play Games app.
    3. Coded and tested Firebase email/password account creation/authentication - its working.
    4. Followed step by step the Firebase Unity docs but got stuck at "Authenticate with Firebase" on https://firebase.google.com/docs/auth/android/google-signin#authenticate_with_firebase

    I'm not sure what to do with the sample code :
    Code (CSharp):
    1.      
    2. // Configure Google Sign In
    3.         GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
    4.                 .requestIdToken(getString(R.string.default_web_client_id))
    5.                 .requestEmail()
    6.                 .build();
    7.  
    Any help, pointers, tutorials on how to proceed would be much appreciated.
     
    Last edited: Jan 8, 2017
    rszalski and olonge like this.
  2. olonge

    olonge

    Joined:
    Sep 22, 2014
    Posts:
    16
    I'm in the same boat.
    I currently sign in using GooglePlayGames so as to have access to leaderboards and achievements, however, I'd like to be able to save into the Firebase database hence I need to get this working as well.

    This is my 2nd day on this. I'll let you know how far I get
     
  3. Neophen

    Neophen

    Joined:
    May 28, 2014
    Posts:
    21
    Hey guys, in the same boat here. Let you know if I find anything, have you guys had any luck?
     
  4. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    375
    same here in 2018
     
  5. tungnguyendev

    tungnguyendev

    Joined:
    Mar 26, 2014
    Posts:
    13