Closed isthargames closed 4 months ago
Hm. It doesn't do that anywhere for anyone else, so I'm inclined to believe this is a bug in your code. I'm guessing it only worked before because you weren't saving the auth file or something correctly. https://github.com/GodotNuts/GodotFirebase/blob/fa306a52e2c84980912955dd00b91abe36027723/addons/godot-firebase/auth/auth.gd#L510 this function attempts to log you in automatically, so it looks like something in your code is causing it to go infinite. I recommend you use needs_login() instead of check_auth_file(). You can find that function here: https://github.com/GodotNuts/GodotFirebase/blob/fa306a52e2c84980912955dd00b91abe36027723/addons/godot-firebase/auth/auth.gd#L387
Umm it's a little strange because I've reviewed a lot and using need_login() it still does the same thing, the only solution I could do is:
func check_auth():
if Firebase.Auth.check_auth_file():
Firebase.Auth.login_succeeded.disconnect(on_login_succeeded)
login_profile.visible = true
logout_profile.visible = false
else:
login_profile.visible = false
logout_profile.visible = true
Best I can do at this point is have you private message me on Discord with a zip of your project so I can fix it. I can't see enough of your code to know what's wrong otherwise, since all my projects and the test harness work fine.
Closing after no response for two weeks.
Hello everyone
I recently updated to the latest version of the plugin in my project, and I've noticed some changes in the code. Currently, I'm experiencing a bug that didn't occur in the previous version.
It consists in that when I log in with an email and the _on_loginsucceeded(auth) function verifies it as correct, it makes me redirect infinitely to a scene, which is clearly inefficient and frustrating. Since when it verifies the file it does: _get_tree().call_deferred("change_scene_to_packed", ResourceLoader.load_threaded_get(LoadScenes.homescene)). Before it worked very well, because once I logged in it would redirect me to the home scene only once, now I don't know why it does it infinitely. Or I could delete all the code from the function and leave a print("logged in correctly") to see what happens, but it still prints infinitely. What can I do to fix this?
Here's my code: