firebaseAuth plugin by Scott H Tech

Hi, 

I testing the firebaseAuth.signInWithGoogle function, but I do not understand where to recover the idToken or accesstoken. I was expecting something like the old google-signIn, but I do not understand how it works.

Thanks

Google sign in should work through the google sign in plugin
https://marketplace.coronalabs.com/plugin/google-sign-in

Sorry I don’t understand. Do I need to use google sign-In plugin with FirebaseAuth plugin?

You need to use google sign in plugin to login with google. You would take the id from the google sign in plugin and pass it into firebase auth.

Ok, now I understand. So if I only need the email address of my user I need to use just the google sign-in plugin right?

googleSignIn.signIn("insert client id here", nil, nil, function (e) if (event.isError == true) then -- something went wrong, they did not sign in or id is wrong else firebaseAuth.signInWithGoogle(e.idToken, e.accessToken,function(event) if (event.isError == true) then -- error else -- we signed in :) end ) end end)

Thank you very much! Now it’s all clear, I only have one last problem: when I try to compile for ios with both plugins (Auth Firebase and google sign-in) I get this error:

Device build error occurred on the server.

Error: Plugins file name naming conflict

Thanks!

this should be fixed

Thanks! Now it’s work fine!

Just one thing! Sign-In plugin work fine on Android, but when I try to log-in on iOS device the debugger enter in “google case” but not in

->googleSignIn.signIn(clientID, nil, nil, function (e)

nothing happens, no call. I followed the documentation, put the plist file in the root and inserted this code:

local googleSignIn = require “plugin.googleSignIn”

googleSignIn.init()

local androidClientID = “my id”

local clientID = “my id” – iOS deafult

if (system.getInfo(“platform”) == “android”) then

    clientID = androidClientID

end

Thanks!

Can you pm a test project?

Hi,
Is there a solution for this problem? Could you post it please?

Please file bug reports here 

https://docs.google.com/forms/d/e/1FAIpQLSf-V3z-V3FZ5y9Sb19cxVfjx7fSRV9HIbpAGptN7DaY3Ki_DA/viewform