From 2e991c81ffa69817af95d8320c8adc122ec69bc5 Mon Sep 17 00:00:00 2001 From: Young June Park Date: Sat, 24 Dec 2022 16:47:39 +0900 Subject: [PATCH] =?UTF-8?q?[refactor]=20=ED=9A=8C=EC=9B=90=20=ED=83=88?= =?UTF-8?q?=ED=87=B4=20=EC=8B=9C=20auth=EC=97=90=EC=84=9C=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=20=EC=82=AD=EC=A0=9C=20=EB=90=9C=20=EA=B2=BD=EC=9A=B0?= =?UTF-8?q?=20error=20=EB=82=B4=EC=A7=80=20=EC=95=8A=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SpaceCapsule/Manager/Firebase/FirebaseAuthManager.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SpaceCapsule/SpaceCapsule/Manager/Firebase/FirebaseAuthManager.swift b/SpaceCapsule/SpaceCapsule/Manager/Firebase/FirebaseAuthManager.swift index c225852..34a5e26 100644 --- a/SpaceCapsule/SpaceCapsule/Manager/Firebase/FirebaseAuthManager.swift +++ b/SpaceCapsule/SpaceCapsule/Manager/Firebase/FirebaseAuthManager.swift @@ -50,7 +50,11 @@ final class FirebaseAuthManager { } func deleteAccountFromAuth(completion: @escaping ((FBAuthError?) -> Void)) { - auth.currentUser?.delete { error in + guard let currentUser = auth.currentUser else { + completion(nil) + return + } + currentUser.delete { error in if error != nil { completion(FBAuthError.deleteUserFromAuthError) } else {