Closed Firemanarg closed 3 years ago
This has been implemented as of: https://github.com/GodotNuts/GodotFirebase/pull/205 - Feel free to check that out. I'm going to close this issue, but there's some documentation in the PR to explain it.
@Firemanarg Hi, To login directly with Google Accounts without copypaste, you just need to use this snippet (adapt it to your own needs)
func _ready():
Firebase.Auth.connect("login_succeeded", self, "_on_login_succeeded")
Firebase.Auth.get_google_auth_localhost()
func _on_login_succeeded(user : Dictionary):
#use @user as you wish
When the get_google_auth_localhost()
is called for the first time it will automatically open your browser to let you select an account. After confirmation, an error page will appear. That page is actually a success page, if everything went fine, and the user can just go back to the application since it will be authenticated.
To make this work, you need to do two things prior:
I'm trying to implement a platform where users can login directly with their Google Accounts, without the need of copy and paste a token.
There is an example on documentation, but apparently that's for an old version. It would help a lot if you could provide some usage examples (I don't have much knowledge about networking programming and databases, and your API helped me a lot).
Pd: This is my first GitHub request ever, so I'm not sure if this is the right place to request this xD