-
Notifications
You must be signed in to change notification settings - Fork 0
[#247] 회원 탈퇴 후 뷰가 LoginView로 돌아가지 않는 이슈를 해결한다 #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,14 +81,19 @@ final class GithubAuthenticationService: NSObject, AuthenticationService { | |
| } | ||
|
|
||
| func deleteAuth(_ uid: String) async throws { | ||
| guard let currentUser = Auth.auth().currentUser else { | ||
| throw AuthError.notAuthenticated | ||
| } | ||
|
|
||
| try await revokeAccessToken() | ||
|
|
||
| let deleteFunction = functions.httpsCallable("deleteUserFirestoreData") | ||
|
|
||
| _ = try await deleteFunction.call(["uid": uid]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| try await signOut(uid) | ||
| try await user?.delete() | ||
| try await currentUser.delete() | ||
| try await messaging.deleteToken() | ||
| try Auth.auth().signOut() | ||
| } | ||
|
|
||
| func link(uid: String, email: String) async throws { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -78,12 +78,19 @@ final class GoogleAuthenticationService: AuthenticationService { | |
| } | ||
|
|
||
| func deleteAuth(_ uid: String) async throws { | ||
| guard let currentUser = Auth.auth().currentUser else { | ||
| throw AuthError.notAuthenticated | ||
| } | ||
|
|
||
| let deleteFunction = functions.httpsCallable("deleteUserFirestoreData") | ||
|
|
||
| _ = try await deleteFunction.call(["uid": uid]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| try await signOut(uid) | ||
| try await Auth.auth().currentUser?.delete() | ||
| try await currentUser.delete() | ||
| GIDSignIn.sharedInstance.signOut() | ||
| try await GIDSignIn.sharedInstance.disconnect() | ||
| try await messaging.deleteToken() | ||
| try Auth.auth().signOut() | ||
| } | ||
|
|
||
| func link(uid: String, email: String) async throws { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uid파라미터 대신currentUser.uid를 사용하는 것이 더 안전하고 명확합니다. 함수 시작 부분에서currentUser의 유효성을 이미 확인했으므로, 이currentUser의uid를 사용하여 Firestore 데이터를 삭제하는 것이 일관성을 유지하고 잠재적인 불일치 문제를 방지할 수 있습니다.