Skip to content
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

[GWL-268] 로그인 회원가입 연결 및 서버통신 #297

Merged
merged 23 commits into from
Dec 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
51762a0
fix: CircularDepedency 현상 개선
JongPyoAhn Dec 7, 2023
ddcac9a
chore: 중복 Mutipart제거
JongPyoAhn Dec 7, 2023
b5602ba
docs: 주석 제거
JongPyoAhn Dec 7, 2023
55d71b6
chore: MultiPart-Trinet 재결합
JongPyoAhn Dec 7, 2023
2c43ec2
feat: Trinet No Interceptor Upload
JongPyoAhn Dec 7, 2023
30f3178
rename: userBit -> newUserInformation
JongPyoAhn Dec 7, 2023
e907399
rename: userBit-newUserInformation
JongPyoAhn Dec 7, 2023
47062c7
fix: SignUp넘어갈 때, mainThread 에러 수정
JongPyoAhn Dec 7, 2023
e8bcad0
fix: ImageForm데이터 전달 안되는 현상 개선 및 회원가입 완료 시 받아온 토큰값 저장하는 로직 작성
JongPyoAhn Dec 8, 2023
4f5a905
chore: Lint 정상화
JongPyoAhn Dec 8, 2023
58d639e
fix: SignUpGenderBirth에서 SignUpProfile까지 성별벌스 데이터 이동안되는 현상 개선
JongPyoAhn Dec 8, 2023
929172f
Login, SignUp, TabBar Coordinator 연결
JongPyoAhn Dec 9, 2023
5b8e43c
add: Auth모듈 추가
JongPyoAhn Dec 9, 2023
a1375b0
add: Auth모듈에 Token Entity
JongPyoAhn Dec 9, 2023
a55e413
add: Auth모듈에 AuthProvider추가
JongPyoAhn Dec 9, 2023
8695a5a
chore: Token접근제어자 수정
JongPyoAhn Dec 9, 2023
6dd8a37
feat: 로그인 완료 시, 분기처리
JongPyoAhn Dec 9, 2023
d647ec1
fix: Encoder로 인해 액세스토큰이 키체인에 쌍따옴표가 붙어서 저장되는 현상 개선
JongPyoAhn Dec 9, 2023
376e072
Merge branch 'develop' into feature/iOS/GWL-268
WhiteHyun Dec 9, 2023
e9b9603
chore: lint 복구
WhiteHyun Dec 9, 2023
6d010f5
fix: merge conflict
JongPyoAhn Dec 9, 2023
2332606
fix: form-Data 이미지 그린아이에서 튕기는 현상 개선 이유 : fileName
JongPyoAhn Dec 9, 2023
9ff660a
chore: 피드백 반영
JongPyoAhn Dec 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Lint 정상화
JongPyoAhn committed Dec 8, 2023
commit 4f5a905cbc7a830e54f13a6c3edc1b30679663ae
70 changes: 35 additions & 35 deletions iOS/.swiftlint.yml
Original file line number Diff line number Diff line change
@@ -33,38 +33,38 @@ trailing_comma:
line_length:
warning: 150

#custom_rules:
# no_objcMembers:
# name: "@objcMembers"
# regex: "@objcMembers"
# message: "Explicitly use @objc on each member you want to expose to Objective-C"
# severity: error
# no_direct_standard_out_logs:
# name: "Writing log messages directly to standard out is disallowed"
# regex: "(\\bprint|\\bdebugPrint|\\bdump|Swift\\.print|Swift\\.debugPrint|Swift\\.dump)\\s*\\("
# match_kinds:
# - identifier
# message: "Don't commit `print(…)`, `debugPrint(…)`, or `dump(…)` as they write to standard out in release. Either log to a dedicated logging system or silence this warning in debug-only scenarios explicitly using `// swiftlint:disable:next no_direct_standard_out_logs`"
# severity: error
# no_file_literal:
# name: "#file is disallowed"
# regex: "(\\b#file\\b)"
# match_kinds:
# - identifier
# message: "Instead of #file, use #fileID"
# severity: error
# no_filepath_literal:
# name: "#filePath is disallowed"
# regex: "(\\b#filePath\\b)"
# match_kinds:
# - identifier
# message: "Instead of #filePath, use #fileID."
# severity: error
# no_unchecked_sendable:
# name: "`@unchecked Sendable` is discouraged."
# regex: "@unchecked Sendable"
# match_kinds:
# - attribute.builtin
# - typeidentifier
# message: "Instead of using `@unchecked Sendable`, consider a safe alternative like a standard `Sendable` conformance or using `@preconcurrency import`. If you really must use `@unchecked Sendable`, you can add a `// swiftlint:disable:next no_unchecked_sendable` annotation with an explanation for how we know the type is thread-safe, and why we have to use @unchecked Sendable instead of Sendable. More explanation and suggested safe alternatives are available at https://github.com/airbnb/swift#unchecked-sendable."
# severity: error
custom_rules:
no_objcMembers:
name: "@objcMembers"
regex: "@objcMembers"
message: "Explicitly use @objc on each member you want to expose to Objective-C"
severity: error
no_direct_standard_out_logs:
name: "Writing log messages directly to standard out is disallowed"
regex: "(\\bprint|\\bdebugPrint|\\bdump|Swift\\.print|Swift\\.debugPrint|Swift\\.dump)\\s*\\("
match_kinds:
- identifier
message: "Don't commit `print(…)`, `debugPrint(…)`, or `dump(…)` as they write to standard out in release. Either log to a dedicated logging system or silence this warning in debug-only scenarios explicitly using `// swiftlint:disable:next no_direct_standard_out_logs`"
severity: error
no_file_literal:
name: "#file is disallowed"
regex: "(\\b#file\\b)"
match_kinds:
- identifier
message: "Instead of #file, use #fileID"
severity: error
no_filepath_literal:
name: "#filePath is disallowed"
regex: "(\\b#filePath\\b)"
match_kinds:
- identifier
message: "Instead of #filePath, use #fileID."
severity: error
no_unchecked_sendable:
name: "`@unchecked Sendable` is discouraged."
regex: "@unchecked Sendable"
match_kinds:
- attribute.builtin
- typeidentifier
message: "Instead of using `@unchecked Sendable`, consider a safe alternative like a standard `Sendable` conformance or using `@preconcurrency import`. If you really must use `@unchecked Sendable`, you can add a `// swiftlint:disable:next no_unchecked_sendable` annotation with an explanation for how we know the type is thread-safe, and why we have to use @unchecked Sendable instead of Sendable. More explanation and suggested safe alternatives are available at https://github.com/airbnb/swift#unchecked-sendable."
severity: error
10 changes: 10 additions & 0 deletions iOS/Projects/Core/Network/Sources/TNProvidable.swift
Original file line number Diff line number Diff line change
@@ -48,6 +48,9 @@ public struct TNProvider<T: TNEndPoint>: TNProvidable {

public func request(_ service: T, successStatusCodeRange range: Range<Int> = 200 ..< 300) async throws -> Data {
let (data, response) = try await session.data(for: service.request(), delegate: nil)
let res = try JSONDecoder().decode(Response.self, from: data)
print("코드 : \(res.code)")
print("에러 메시지 : \(res.errorMessage)")
try checkStatusCode(response, successStatusCodeRange: range)
return data
}
@@ -81,3 +84,10 @@ private extension TNProvider {
}
}
}

// MARK: - Response

private struct Response: Codable {
let code: Int?
let errorMessage: String?
}
Original file line number Diff line number Diff line change
@@ -40,11 +40,9 @@ struct AuthorizationRepository: AuthorizationRepositoryRepresentable {
let authorizationInfoRequestDTO = AuthorizationInfoRequestDTO(identityToken: token, authorizationCode: authorizationCode)

let data = try await provider.request(.signIn(authorizationInfoRequestDTO))
Log.make().debug("\(data)")
guard let responseCode = try decoder.decode(Response.self, from: data).code else {
return
}
Log.make().debug("\(responseCode)")
switch responseCode {
case AuthorizationRepositoryResponseCode.token.code:
let token = try decoder.decode(GWResponse<Token>.self, from: data).data
@@ -72,7 +70,7 @@ enum AuthorizationRepositoryEndPoint: TNEndPoint {
var path: String {
switch self {
case .signIn:
return "auth/apple/signin"
return "/api/v1/auth/apple/signin"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이부분을 이렇게 쓰면 , api 버전이 높아지면 어떻게 될까요? p3

}
}

@@ -96,7 +94,6 @@ enum AuthorizationRepositoryEndPoint: TNEndPoint {

var headers: TNHeaders {
return .init(headers: [
// TODO: 헤더 설정
])
}
}
Original file line number Diff line number Diff line change
@@ -30,7 +30,7 @@ public final class LoginFeatureCoordinator: LoginFeatureCoordinating {
func showLoginFlow() {
let coordinator = LoginCoordinator(
navigationController: navigationController,
isMockEnvironment: true,
isMockEnvironment: false,
isMockFirst: true
)
childCoordinators.append(coordinator)
Original file line number Diff line number Diff line change
@@ -119,9 +119,6 @@ extension SignUpProfileViewModel: SignUpProfileViewModelRepresentable {
}
.store(in: &subscriptions)

let genderBirth = input.genderBirth

// Complete 버튼이 클릭되어야만 해당 코드가 동작된다.
Publishers
.CombineLatest3(imageFormSubject.eraseToAnyPublisher(), nickNameSubject.eraseToAnyPublisher(), input.genderBirth)
.sink { [weak self] imageForm, nickName, genderBirth in