Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Outdated example in docs #345

Closed
phil-hudson opened this issue Jun 21, 2023 · 4 comments
Closed

[BUG] Outdated example in docs #345

phil-hudson opened this issue Jun 21, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@phil-hudson
Copy link

Describe the bug
Authentication and user management docs are outdated:

func _on_FirebaseAuth_login_succeeded(auth):
	var user = await Firebase.Auth.get_user_data()
	print(user)
	

this should instead set a connection in ready and print this in the signal

On this page toward the bottom:

https://github.com/GodotNuts/GodotFirebase/wiki/Authentication-and-User-Management#get-user-data

@phil-hudson phil-hudson added the bug Something isn't working label Jun 21, 2023
@WolfgangSenff
Copy link
Collaborator

No - what's there is completely valid. By calling await, it will wait for get_user_data() to return and hand the user back to you, or it should. If that doesn't work, then that's a different bug, so closing this.

@phil-hudson
Copy link
Author

Take a look at:

_on_FirebaseAuth_request_completed

you can see it only emits the signal with the data, the function itself returns void.

I just tested implementing the example, and found it didn't work - using the signal method does work.

@WolfgangSenff
Copy link
Collaborator

Okay, like I said then, that's a different bug. I think we were supposed to reimplement it when we switched to 4.0 and I didn't realize that and just went with it. I'll see if I can fix that. If you want to update the title of this, I'll reopen it and will eventually be able to take a look.

@WolfgangSenff WolfgangSenff reopened this Jun 21, 2023
@WolfgangSenff
Copy link
Collaborator

I have updated the documentation accordingly. Good find!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants