From 9a2d59691617fc0fb2b29c12a45043a9988a2a45 Mon Sep 17 00:00:00 2001 From: Matthew D'Souza <64600706+matth3wdsouza@users.noreply.github.com> Date: Wed, 1 May 2024 17:59:53 +0530 Subject: [PATCH] Remove auth file after successful account deletion (#397) * fix: remove auth file on successful account deletion * fix: use spaces for indentation instead of tabs --- addons/godot-firebase/auth/auth.gd | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/godot-firebase/auth/auth.gd b/addons/godot-firebase/auth/auth.gd index dc47f14..915433a 100644 --- a/addons/godot-firebase/auth/auth.gd +++ b/addons/godot-firebase/auth/auth.gd @@ -437,9 +437,9 @@ func _on_FirebaseAuth_request_completed(result : int, response_code : int, heade # Refresh token countdown auth_request.emit(1, auth) - if _needs_refresh: - _needs_refresh = false - login_succeeded.emit(auth) + if _needs_refresh: + _needs_refresh = false + login_succeeded.emit(auth) else: match res.kind: RESPONSE_SIGNUP: @@ -601,6 +601,8 @@ func delete_user_account() -> void: if err != OK: is_busy = false Firebase._printerr("Error deleting user: %s" % err) + else: + remove_auth() # Function is called when a new token is issued to a user. The function will yield until the token has expired, and then request a new one.