feat(nodes): Add Auth node helper
Using signals to simplify setting up auth from the editor.
Expose W4Client Identity via a new "identity" property.
extends Control
@onready var auth := $W4AuthHelper as W4AuthHelper
func _ready():
if auth.is_logged_in():
print("Already logged in")
else:
print("Logging in")
auth.login_device()
func _on_w_4_auth_helper_logged_in():
print("Logged in")
func _on_w_4_auth_helper_logged_out():
print("Logged out")
func _on_w_4_auth_helper_login_error(message):
print("Login error: %s" % message)
func _on_w_4_auth_helper_signup_succeeded(needs_verification: bool):
print("Signup succeeded. Needs verification: ", needs_verification)
func _on_w_4_auth_helper_signup_error(message):
print("Signup error: %s" % message)
Edited by Fabio Alessandrelli