Skip to content

Commit

Permalink
[fix] #111 구글 로그인 탈퇴 안되는 문제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ShapeKim98 committed Sep 8, 2024
1 parent c344988 commit 94e3bcf
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
4 changes: 1 addition & 3 deletions Projects/CoreKit/Sources/Data/DTO/Auth/WithdrawRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,9 @@ import Foundation
/// 회원탈퇴 API Request
/// 📌 회원탈퇴는 Response가 없음
public struct WithdrawRequest: Encodable {
public let refreshToken: String
public let authPlatform: String

public init(refreshToken: String, authPlatform: String) {
self.refreshToken = refreshToken
public init(authPlatform: String) {
self.authPlatform = authPlatform
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -213,30 +213,31 @@ private extension PokitSettingFeature {
return
}

guard let authCode = userDefaults.stringKey(.authCode) else {
print("authCode가 없어서 벗어남")
return
}

guard let jwt = userDefaults.stringKey(.jwt) else {
print("jwt가 없어서 벗어남")
return
if platform == "애플" {
guard let authCode = userDefaults.stringKey(.authCode) else {
print("authCode가 없어서 벗어남")
return
}

guard let jwt = userDefaults.stringKey(.jwt) else {
print("jwt가 없어서 벗어남")
return
}

guard let serverRefreshToken = keychain.read(.serverRefresh) else { return }

try await authClient.appleRevoke(
serverRefreshToken,
AppleTokenRequest(
authCode: authCode,
jwt: jwt
)
)
}

guard let serverRefreshToken = keychain.read(.serverRefresh) else { return }

await send(.async(.키_제거))

try await authClient.appleRevoke(
serverRefreshToken,
AppleTokenRequest(
authCode: authCode,
jwt: jwt
)
)

let request = WithdrawRequest(
refreshToken: serverRefreshToken,
authPlatform: platform
)

Expand Down

0 comments on commit 94e3bcf

Please sign in to comment.