Skip to content

Commit

Permalink
Merge pull request #84 from TeamHY2/Feature/#79-WithdrawInApple
Browse files Browse the repository at this point in the history
[Feature] 애플로그인 회원탈퇴 정책 반영
  • Loading branch information
Seokki-Kwon authored Nov 12, 2024
2 parents 930aeae + 1b0cf9f commit dc20314
Show file tree
Hide file tree
Showing 20 changed files with 594 additions and 103 deletions.
61 changes: 61 additions & 0 deletions HongikYeolgong2.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,16 @@
47BACCF72CA164BA00295DAC /* Font+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47BACCF62CA164BA00295DAC /* Font+.swift */; };
47BE30E32CC813BB0015D973 /* KeyChainManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47BE30E22CC813BB0015D973 /* KeyChainManager.swift */; };
47BE30E52CC81A9E0015D973 /* URLRequest+.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47BE30E42CC81A9E0015D973 /* URLRequest+.swift */; };
47C815382CE21E640017EA24 /* ASAuthEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815372CE21E640017EA24 /* ASAuthEndpoint.swift */; };
47C815412CE221060017EA24 /* SocialLoginRepositoryImpl.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815402CE221060017EA24 /* SocialLoginRepositoryImpl.swift */; };
47C815432CE2211D0017EA24 /* SocialLoginRepository.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815422CE2211D0017EA24 /* SocialLoginRepository.swift */; };
47C815462CE223DA0017EA24 /* ASTokenResponseDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815452CE223DA0017EA24 /* ASTokenResponseDTO.swift */; };
47C815482CE227E50017EA24 /* ASTokenRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815472CE227E50017EA24 /* ASTokenRequestDTO.swift */; };
47C8154B2CE231810017EA24 /* SwiftJWT in Frameworks */ = {isa = PBXBuildFile; productRef = 47C8154A2CE231810017EA24 /* SwiftJWT */; };
47C815532CE257950017EA24 /* AuthKey_843UNB7W58.p8 in Resources */ = {isa = PBXBuildFile; fileRef = 47C815522CE257950017EA24 /* AuthKey_843UNB7W58.p8 */; };
47C815552CE26EE40017EA24 /* ASRevokeTokenRequestDTO.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815542CE26EE40017EA24 /* ASRevokeTokenRequestDTO.swift */; };
47C815582CE27E140017EA24 /* OnboardingPageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815572CE27E140017EA24 /* OnboardingPageView.swift */; };
47C8155A2CE27EB00017EA24 /* AppleLoginButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47C815592CE27EB00017EA24 /* AppleLoginButton.swift */; };
47CA17252CC9336100CBB251 /* StudyPeriodView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CA17242CC9336100CBB251 /* StudyPeriodView.swift */; };
47CA17272CC9340800CBB251 /* StudyTimerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47CA17262CC9340800CBB251 /* StudyTimerView.swift */; };
47D5EDCD2CCBCB6D00ACA469 /* ImageBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47D5EDCC2CCBCB6D00ACA469 /* ImageBackground.swift */; };
Expand Down Expand Up @@ -273,6 +283,15 @@
47BACCF62CA164BA00295DAC /* Font+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Font+.swift"; sourceTree = "<group>"; };
47BE30E22CC813BB0015D973 /* KeyChainManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeyChainManager.swift; sourceTree = "<group>"; };
47BE30E42CC81A9E0015D973 /* URLRequest+.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "URLRequest+.swift"; sourceTree = "<group>"; };
47C815372CE21E640017EA24 /* ASAuthEndpoint.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASAuthEndpoint.swift; sourceTree = "<group>"; };
47C815402CE221060017EA24 /* SocialLoginRepositoryImpl.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocialLoginRepositoryImpl.swift; sourceTree = "<group>"; };
47C815422CE2211D0017EA24 /* SocialLoginRepository.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SocialLoginRepository.swift; sourceTree = "<group>"; };
47C815452CE223DA0017EA24 /* ASTokenResponseDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTokenResponseDTO.swift; sourceTree = "<group>"; };
47C815472CE227E50017EA24 /* ASTokenRequestDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASTokenRequestDTO.swift; sourceTree = "<group>"; };
47C815522CE257950017EA24 /* AuthKey_843UNB7W58.p8 */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AuthKey_843UNB7W58.p8; sourceTree = "<group>"; };
47C815542CE26EE40017EA24 /* ASRevokeTokenRequestDTO.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASRevokeTokenRequestDTO.swift; sourceTree = "<group>"; };
47C815572CE27E140017EA24 /* OnboardingPageView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingPageView.swift; sourceTree = "<group>"; };
47C815592CE27EB00017EA24 /* AppleLoginButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppleLoginButton.swift; sourceTree = "<group>"; };
47CA17242CC9336100CBB251 /* StudyPeriodView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyPeriodView.swift; sourceTree = "<group>"; };
47CA17262CC9340800CBB251 /* StudyTimerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StudyTimerView.swift; sourceTree = "<group>"; };
47D5EDCC2CCBCB6D00ACA469 /* ImageBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageBackground.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -315,6 +334,7 @@
47F71B592CDC68BC0044DEC5 /* FirebaseFirestoreCombine-Community in Frameworks */,
47F71B532CDC68BC0044DEC5 /* FirebaseAuthCombine-Community in Frameworks */,
47F71B632CDC813A0044DEC5 /* FirebaseFunctionsCombine-Community in Frameworks */,
47C8154B2CE231810017EA24 /* SwiftJWT in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -351,6 +371,7 @@
47F635012CC3E98D0034EAA9 /* UserEndpoint.swift */,
4786A1062CCA33DF008635A4 /* WeeklyEndpoint.swift */,
470483A72CDB50FA00C381ED /* TokenEndpoint.swift */,
47C815372CE21E640017EA24 /* ASAuthEndpoint.swift */,
);
path = Endpoints;
sourceTree = "<group>";
Expand All @@ -369,6 +390,7 @@
isa = PBXGroup;
children = (
4707230A2CBC19C10046469F /* AuthRepositoryImpl.swift */,
47C815402CE221060017EA24 /* SocialLoginRepositoryImpl.swift */,
);
path = Auth;
sourceTree = "<group>";
Expand Down Expand Up @@ -683,6 +705,7 @@
470723082CBC198E0046469F /* AuthRepository.swift */,
4786A1082CCA346F008635A4 /* StudySessionRepository.swift */,
478F843D2CD326E90097CAA1 /* WeeklyRepository.swift */,
47C815422CE2211D0017EA24 /* SocialLoginRepository.swift */,
);
path = Interfaces;
sourceTree = "<group>";
Expand Down Expand Up @@ -752,6 +775,7 @@
47A5406E2CD0B8AB00DC40D0 /* Onboarding */ = {
isa = PBXGroup;
children = (
47C815562CE27E050017EA24 /* Component */,
47A1477F2CA15A4E00A91F66 /* OnboardingView.swift */,
);
path = Onboarding;
Expand All @@ -768,6 +792,7 @@
47B1D49F2C9CB1740071B62B = {
isa = PBXGroup;
children = (
47C815522CE257950017EA24 /* AuthKey_843UNB7W58.p8 */,
98B5F0092CDB362C007CF5FA /* Secrets-dev.xcconfig */,
479821D32CA24CFF002357EB /* .swiftlint.yml */,
47B1D4AA2C9CB1740071B62B /* HongikYeolgong2 */,
Expand Down Expand Up @@ -840,6 +865,15 @@
path = UI;
sourceTree = "<group>";
};
47C815562CE27E050017EA24 /* Component */ = {
isa = PBXGroup;
children = (
47C815572CE27E140017EA24 /* OnboardingPageView.swift */,
47C815592CE27EB00017EA24 /* AppleLoginButton.swift */,
);
path = Component;
sourceTree = "<group>";
};
47D5EDC52CCB66BD00ACA469 /* StudyTimer */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -891,6 +925,9 @@
47F4F6982CC89A6900543D24 /* SignUpResponseDTO.swift */,
470483A92CDB532A00C381ED /* TokenValidResponseDTO.swift */,
4774C7BA2CDF632300CDD479 /* WithdrawResponseDTO.swift */,
47C815452CE223DA0017EA24 /* ASTokenResponseDTO.swift */,
47C815472CE227E50017EA24 /* ASTokenRequestDTO.swift */,
47C815542CE26EE40017EA24 /* ASRevokeTokenRequestDTO.swift */,
);
path = Auth;
sourceTree = "<group>";
Expand Down Expand Up @@ -967,6 +1004,7 @@
47F71B5E2CDC813A0044DEC5 /* FirebaseDatabase */,
47F71B602CDC813A0044DEC5 /* FirebaseFunctions */,
47F71B622CDC813A0044DEC5 /* FirebaseFunctionsCombine-Community */,
47C8154A2CE231810017EA24 /* SwiftJWT */,
);
productName = HongikYeolgong2;
productReference = 47B1D4A82C9CB1740071B62B /* HongikYeolgong2.app */;
Expand Down Expand Up @@ -1042,6 +1080,7 @@
mainGroup = 47B1D49F2C9CB1740071B62B;
packageReferences = (
47F71B4F2CDC68BC0044DEC5 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */,
47C815492CE231810017EA24 /* XCRemoteSwiftPackageReference "Swift-JWT" */,
);
productRefGroup = 47B1D4A92C9CB1740071B62B /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -1070,6 +1109,7 @@
47A147652CA147A600A91F66 /* Pretendard-ExtraBold.otf in Resources */,
47B1D4B32C9CB1760071B62B /* Preview Assets.xcassets in Resources */,
47A1476D2CA147A600A91F66 /* SUITE-ExtraBold.otf in Resources */,
47C815532CE257950017EA24 /* AuthKey_843UNB7W58.p8 in Resources */,
47A1476F2CA147A600A91F66 /* SUITE-Light.otf in Resources */,
47A147722CA147A600A91F66 /* SUITE-SemiBold.otf in Resources */,
47B1D4B02C9CB1760071B62B /* Assets.xcassets in Resources */,
Expand Down Expand Up @@ -1130,6 +1170,7 @@
472319ED2CD1FC32009BA019 /* UIApplication+.swift in Sources */,
4763FFB12CB90C1500990336 /* DependencyInjector.swift in Sources */,
47F79B2E2CCCB7AA00DD0899 /* TimePickerView.swift in Sources */,
47C815432CE2211D0017EA24 /* SocialLoginRepository.swift in Sources */,
476D26092CDDF2B6002FEF5C /* CalendarCountAllResponseDTO.swift in Sources */,
478F84392CD3176E0097CAA1 /* RankingDataInteractor.swift in Sources */,
475B86E12CA1AF31000534B2 /* RankingView.swift in Sources */,
Expand All @@ -1143,6 +1184,7 @@
478F84442CD350850097CAA1 /* WeeklyRankingResponseDTO.swift in Sources */,
473E8EBC2CCEBEF3000F102C /* ModalView.swift in Sources */,
473E8EB62CCE6A02000F102C /* Date+.swift in Sources */,
47C815412CE221060017EA24 /* SocialLoginRepositoryImpl.swift in Sources */,
470483A82CDB50FA00C381ED /* TokenEndpoint.swift in Sources */,
471940CB2CAFD9B700426D30 /* RankingCell.swift in Sources */,
473671A72CB1404E00527896 /* Ratio.swift in Sources */,
Expand All @@ -1151,6 +1193,8 @@
47BACCF72CA164BA00295DAC /* Font+.swift in Sources */,
4786A1102CCA351A008635A4 /* WeeklyStudySessionDTO.swift in Sources */,
5E847A742CDBD52E0034C2A7 /* CalendarDataInteractor.swift in Sources */,
47C8155A2CE27EB00017EA24 /* AppleLoginButton.swift in Sources */,
47C815482CE227E50017EA24 /* ASTokenRequestDTO.swift in Sources */,
470722FA2CBC0A870046469F /* Constants.swift in Sources */,
478F84492CD359260097CAA1 /* WeeklyRanking.swift in Sources */,
4786A0EC2CC9E2BC008635A4 /* UserPermissionsInteractor.swift in Sources */,
Expand All @@ -1166,6 +1210,7 @@
478F84412CD33F620097CAA1 /* WeekFieldResponseDTO.swift in Sources */,
473E8EBA2CCEA702000F102C /* StudySessionResponseDTO.swift in Sources */,
4752A27D2CB96EB00073B784 /* CancleBag.swift in Sources */,
47C815382CE21E640017EA24 /* ASAuthEndpoint.swift in Sources */,
47A9DCC32CE0DB97001DE76D /* WebView.swift in Sources */,
4736719F2CB120A600527896 /* WeeklyStudyView.swift in Sources */,
4780044C2CCAAD4F00FFAF00 /* WeekDay.swift in Sources */,
Expand Down Expand Up @@ -1194,9 +1239,11 @@
47F71B5D2CDC77C60044DEC5 /* UserDataInteractor+Migration.swift in Sources */,
4763FFB52CB90EBD00990336 /* InitialView.swift in Sources */,
47E250712CCF274400267897 /* WeeklyStudyInteractor.swift in Sources */,
47C815462CE223DA0017EA24 /* ASTokenResponseDTO.swift in Sources */,
470723092CBC198E0046469F /* AuthRepository.swift in Sources */,
47F4F6972CC88FBB00543D24 /* SignUpRequestDTO.swift in Sources */,
478004422CCA924200FFAF00 /* StudySessionMapper.swift in Sources */,
47C815582CE27E140017EA24 /* OnboardingPageView.swift in Sources */,
478F84372CD30A8F0097CAA1 /* IOSBackground.swift in Sources */,
47A1474E2CA144EC00A91F66 /* StudyRoomUsage+Mock.swift in Sources */,
4774C7BB2CDF632300CDD479 /* WithdrawResponseDTO.swift in Sources */,
Expand All @@ -1223,6 +1270,7 @@
473E8EB22CCE5267000F102C /* SystemOverlay.swift in Sources */,
475B86DF2CA1AF1E000534B2 /* RecordView.swift in Sources */,
98F9D8462CDA2E6D00DE12BB /* RecordCell.swift in Sources */,
47C815552CE26EE40017EA24 /* ASRevokeTokenRequestDTO.swift in Sources */,
47A147792CA158E800A91F66 /* MainTabView.swift in Sources */,
47F79B302CCCB7FC00DD0899 /* TimePicker.swift in Sources */,
478FBCA32CD13A1E00256012 /* UserInfo.swift in Sources */,
Expand Down Expand Up @@ -1601,6 +1649,14 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
47C815492CE231810017EA24 /* XCRemoteSwiftPackageReference "Swift-JWT" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/Kitura/Swift-JWT.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.0.1;
};
};
47F71B4F2CDC68BC0044DEC5 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/firebase/firebase-ios-sdk.git";
Expand All @@ -1612,6 +1668,11 @@
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
47C8154A2CE231810017EA24 /* SwiftJWT */ = {
isa = XCSwiftPackageProductDependency;
package = 47C815492CE231810017EA24 /* XCRemoteSwiftPackageReference "Swift-JWT" */;
productName = SwiftJWT;
};
47F71B502CDC68BC0044DEC5 /* FirebaseAuth */ = {
isa = XCSwiftPackageProductDependency;
package = 47F71B4F2CDC68BC0044DEC5 /* XCRemoteSwiftPackageReference "firebase-ios-sdk" */;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"originHash" : "37f87f153a7df0e69f7682478910cd31cbff8c536dc79a044414e38ba896c24f",
"pins" : [
{
"identity" : "abseil-cpp-binary",
Expand All @@ -18,6 +19,33 @@
"version" : "11.2.0"
}
},
{
"identity" : "bluecryptor",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/BlueCryptor.git",
"state" : {
"revision" : "cec97c24b111351e70e448972a7d3fe68a756d6d",
"version" : "2.0.2"
}
},
{
"identity" : "blueecc",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/BlueECC.git",
"state" : {
"revision" : "1485268a54f8135435a825a855e733f026fa6cc8",
"version" : "1.2.201"
}
},
{
"identity" : "bluersa",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/BlueRSA.git",
"state" : {
"revision" : "440f78db26d8bb073f29590f1c7bd31004da09ae",
"version" : "1.0.201"
}
},
{
"identity" : "firebase-ios-sdk",
"kind" : "remoteSourceControl",
Expand Down Expand Up @@ -81,6 +109,15 @@
"version" : "100.0.0"
}
},
{
"identity" : "kituracontracts",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/KituraContracts.git",
"state" : {
"revision" : "6edf7ac3dd2b3a2c61284778d430bbad7d8a6f23",
"version" : "2.0.1"
}
},
{
"identity" : "leveldb",
"kind" : "remoteSourceControl",
Expand All @@ -90,6 +127,15 @@
"version" : "1.22.5"
}
},
{
"identity" : "loggerapi",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/LoggerAPI.git",
"state" : {
"revision" : "4e6b45e850ffa275e8e26a24c6454fd709d5b6ac",
"version" : "2.0.0"
}
},
{
"identity" : "nanopb",
"kind" : "remoteSourceControl",
Expand All @@ -108,6 +154,24 @@
"version" : "2.4.0"
}
},
{
"identity" : "swift-jwt",
"kind" : "remoteSourceControl",
"location" : "https://github.com/Kitura/Swift-JWT.git",
"state" : {
"revision" : "f68ec28fbd90a651597e9e825ea7f315f8d52a1f",
"version" : "4.0.1"
}
},
{
"identity" : "swift-log",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-log.git",
"state" : {
"revision" : "9cb486020ebf03bfa5b5df985387a14a98744537",
"version" : "1.6.1"
}
},
{
"identity" : "swift-protobuf",
"kind" : "remoteSourceControl",
Expand All @@ -118,5 +182,5 @@
}
}
],
"version" : 2
"version" : 3
}
7 changes: 4 additions & 3 deletions HongikYeolgong2/Core/AppEnviroment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ extension AppEnviroment {
userDataInteractor: UserDataMigrationInteractor(
appState: appState,
authRepository: remoteRepository.authRepository,
authService: services.appleAuthService
socialLoginRepository: SocialLoginRepositoryImpl(),
appleLoginService: services.appleAuthService
),
studyTimeInteractor: StudyTimeInteractorImpl(
studySessionRepository: remoteRepository.studySessionRepository
Expand Down Expand Up @@ -93,7 +94,7 @@ extension AppEnviroment {
/// 앱의 서비스를 구성하는 컨테이너를 반환합니다.
/// - Returns: 앱의 서비스를 구성하는 컨테이너
static func configuredServices() -> DIContainer.Services {
.init(appleAuthService: AuthenticationServiceImpl())
.init(appleAuthService: AppleLoginManager())
}
}

Expand All @@ -105,6 +106,6 @@ extension DIContainer {
}

struct Services {
let appleAuthService: AppleLoginManager
let appleAuthService: AppleLoginService
}
}
15 changes: 15 additions & 0 deletions HongikYeolgong2/Data/DTO/Auth/ASRevokeTokenRequestDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// ASRevokeTokenRequestDTO.swift
// HongikYeolgong2
//
// Created by 권석기 on 11/12/24.
//

import Foundation

struct ASRevokeTokenRequestDTO {
let client_id: String
let client_secret: String
let token: String
let token_type_hint: String
}
17 changes: 17 additions & 0 deletions HongikYeolgong2/Data/DTO/Auth/ASTokenRequestDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ASTokenRequestDTO.swift
// HongikYeolgong2
//
// Created by 권석기 on 11/11/24.
//

import Foundation

struct ASTokenRequestDTO: Encodable {
let client_id: String
let client_secret: String
let grant_type: String
let code: String
var refresh_token: String?
var redirect_uri: String?
}
17 changes: 17 additions & 0 deletions HongikYeolgong2/Data/DTO/Auth/ASTokenResponseDTO.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// ASTokenResponseDTO.swift
// HongikYeolgong2
//
// Created by 권석기 on 11/11/24.
//

import Foundation

struct ASTokenResponseDTO: Decodable {
let accessToken: String
let expiresIn: Int
let idToken: String
let refreshToken: String
let tokenType: String
}

Loading

0 comments on commit dc20314

Please sign in to comment.