GodotNuts / GodotFirebase

Implementations of Firebase for Godot using GDScript
MIT License
554 stars 79 forks source link

Missing API Key error message with Google Auth enabled #63

Closed tommasodargenio closed 3 years ago

tommasodargenio commented 3 years ago

I'm trying this plugin out for an upcoming project. However, I'm having some issues with the login process using an existing Google account.

In my firebase app, I've enabled the google authentication integration, and I have been given both web client ID and secret, but I can't see a way to add this in the plugin.

When I try to login (using Firebase.Auth.login_with_email_and_password) I get a 403 - The request is missing a valid API key.

I've added all the relevant parameters in the Project Settings > Firebase > Environment Variables such as API key, auth domain, etc as provided by Firebase when I've created the app.

I'll take a look in the plugin's code and Firebase API to see if I can integrate something in case is missing, I'd appreciate any help or good pointers.

Thanks

fenix-hub commented 3 years ago

Hi, Currently changing plugin settings' values within Project Settings is not working. Sadly it doesn't depend by us, but it is a Godot limit/bug.

To easily overcome this problem, just replace all the values inside the override.cfg file you will find in the root of your project. Once added, reload the project and you will se that all values are correctly stored in Project Settings.

Another simple way of configuration would just be to replace all the values directly in code. Just go to addons\godot-firebase\firebase\firebase.gd and populate the config Dictionary. It will be loaded at run time.

tommasodargenio commented 3 years ago

Thanks for the fast response. That worked, however, it seems the plugin only implements the sign-in with email and password and not OAuth (accounts:signInWithIdp). Unless I'm missing something, but I can't find this API endpoint in the FirebaseAuth class.

Did anybody make any attempt at implementing this?

Thanks

fenix-hub commented 3 years ago

Yes you are right, the implementation is missing for that. We'll manage to add it (and a few others) with the next update, maybe tomorrow :)

Do you think is there any other useful API implementation that is missing?

tommasodargenio commented 3 years ago

I'm happy to hear that you are planning to deploy that so soon :)

I don't know at this point what other features may be helpful as I need to play around with it a bit to see how it fits in my plan, I'll make sure to raise it here in case there is something else I think that could be useful.

Looking forward to seeing the update :)

Cheers