yalcin-ata/godot-android-module-firebase

Can't sign in through google

himaghnam opened this issue · 19 comments

Godot 3.2.2 windows
No debug does not return anything no print(gdscript) output

If you initialize firebase then you can try
if (firebase != null):
show_message("Firebase is working fine")
show_message is a function in my game that shows the message in the center of the screen, so I can test stuff after exporting.

Firebase is initialising and working fine but when i use signin, it shows the email screen but does not work after that

Did you try calling firebase.authentication_google_is_connected() or firebase.authentication_google_get_user() after that?
I do something like this:
func _on_firebase_receive_message(tag, from, key, data) -> void:
show_message("tag:"tag+" from:"+from+" key:"+key+" data:"+str(data))
when signing data would be true if it signed in.
In my game I have a timer to check if google is connected on a loop because sometimes it takes a few seconds.

Even when I tap in sign in the email does not show up in my firebase console and all those gives false and null

Did you add the debug key to the firebase console and the google-services.json in the build folder? If it's not that I have no idea.

Well, I followed all the steps. If it's working for you idk why it's not working for me,currently I am implementing rest apis to use firebase (building up on Gdscript firebase script)

I was using a rest api plugin before but I want easy login with google. I still think your issue is the debug key, when messing around on my project that would happen if the key was not in the firebase console. Also check in the sign-in method, I don't remember if google is enabled by default.

Yeah, Google is enabled, Debug key is good and I have uploaded sha1 key(both debug and release) in firebase even firebase json is in build folder according to the docs.

I would be glad if you could provide a demo project with build folder ( just remove build/build folder)

While my demo project is kind of stuck exporting, I just realized I forgot to give permissions to it.
Did you add permission to access network state and internet on export?

Yes I did give it all the necessary permission and my project does not throw an error while exporting, API also do work but it just return false and null(google sign_in )

Ok, made a new project and is doing the same as yours. Tried on my original project and is broken too, but I didn't change anything...

oops, I fixed it. What happened is that I have an issue with the release apk, you can see it under your issue, and I reinstalled everything, even got a new debug key, and I forgot to update it on firebase. I also noticed that the instructions is missing one step. On the export, on resources add .json to the filter.

Nothing for me, still same only shows up google sigin screen which returns null

I recomend you make a new project and do everything again, if it works then copy the files from the other project. Have you tried exporting on release? I still think it's related to the keys, maybe redownload the google-services.json. Sorry I can't help, I only know a bit from trial and error and I am also stuck on my game.

Did everything I could that's why I switch to rest api.
Firebase is working but it's not signing up in firebase auth.
No auth no idtoken no use

Sorry that I can't help here. I set up a quick and tiny Godot project, configured the project via Firebase Console (sign-in method for Google enabled, copied SHA1 for both debug and release, added project-123456... to my strings.xml. And it works as intended.

Check and double check if you followed all the instructions on the main page. And as mentioned in the instructions: download and copy the new version of google-services.json.

Any special permission? A demo project would really help me or a video tutorial
Edit = It's working now!!

Edit = It's working now!!

Cool!