Skip to content

Commit

Permalink
Remove auth file after successful account deletion (#397)
Browse files Browse the repository at this point in the history
* fix: remove auth file on successful account deletion

* fix: use spaces for indentation instead of tabs
  • Loading branch information
matth3wdsouza authored May 1, 2024
1 parent 30c3029 commit 9a2d596
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions addons/godot-firebase/auth/auth.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 9a2d596

Please sign in to comment.