Skip to content

Commit

Permalink
[refactor] 회원 탈퇴 시 auth에서 이미 삭제 된 경우 error 내지 않기
Browse files Browse the repository at this point in the history
  • Loading branch information
pyj9748 committed Dec 24, 2022
1 parent a8cb78f commit 2e991c8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 2e991c8

Please sign in to comment.