Skip to content

Commit 6529ad4

Browse files
committed
Refactor: 로그인 서버 통신 관련 AuthRepository 및 LoginUseCase 수정
1 parent 2302a1b commit 6529ad4

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

Projects/DataSource/Sources/Repositories/AuthRepository.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,6 @@ public final class AuthRepository: AuthRepositoryProtocol {
2626
self.userDefaultsStorage = userDefaultsStorage
2727
}
2828

29-
public func kakaoLogin() async throws -> String {
30-
let accessToken = try await fetchKakaoToken()
31-
return accessToken
32-
}
33-
3429
public func kakaoLogin() async throws {
3530
let accessToken = try await fetchKakaoToken()
3631
try await requestServerLogin(socialType: .kakao, nickname: nil, token: accessToken)

Projects/Domain/Sources/Protocols/Repository/AuthRepositoryProtocol.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
public protocol AuthRepositoryProtocol {
99
/// 카카오 소셜 로그인을 진행합니다.
10-
/// - Returns: 카카오 SDK를 통해 받은 토큰 값을 반환합니다.
11-
func kakaoLogin() async throws -> String
10+
func kakaoLogin() async throws
1211

1312
/// Apple 소셜 로그인을 진행합니다.
1413
/// - Parameters:

Projects/Domain/Sources/Protocols/UseCase/LoginUseCaseProtocol.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77

88
public protocol LoginUseCaseProtocol {
99
/// 카카오 소셜 로그인을 진행합니다.
10-
/// - Returns: 카카오 SDK를 통해 받은 토큰 값을 반환합니다.
11-
func kakaoLogin() async throws -> String
10+
func kakaoLogin() async throws
1211

1312
/// Apple 소셜 로그인을 진행합니다.
1413
/// - Parameters:

Projects/Domain/Sources/UseCases/Auth/LoginUseCase.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ public final class LoginUseCase: LoginUseCaseProtocol {
1414
self.authRepository = authRepository
1515
}
1616

17-
public func kakaoLogin() async throws -> String {
18-
return try await authRepository.kakaoLogin()
17+
public func kakaoLogin() async throws {
18+
try await authRepository.kakaoLogin()
1919
}
2020

2121
public func appleLogin(nickname: String?, authToken: String) async throws {

0 commit comments

Comments
 (0)