feat(auth): 인증 후 콘텐츠 설정과 개발용 모의 인증을 추가한다

This commit is contained in:
Yu Sung
2026-10-13 11:37:03 +09:00
parent e34a51b411
commit 61bfa46c11
20 changed files with 1203 additions and 181 deletions
@@ -43,6 +43,14 @@ extension UserDefaults {
}
static func set(_ value: String, forKey key: UserDefaultsKey) {
#if AUTH_VERIFICATION_MOCK
if key == .token {
AuthVerificationMock.shared.resetSession {
UserDefaults.standard.set(value, forKey: key.rawValue)
}
return
}
#endif
let key = key.rawValue
UserDefaults.standard.set(value, forKey: key)
}
@@ -78,6 +86,12 @@ extension UserDefaults {
}
static func reset() {
#if AUTH_VERIFICATION_MOCK
AuthVerificationMock.shared.resetSession {
UserDefaultsKey.allCases.filter { $0 != .pushToken }.forEach { UserDefaults.standard.removeObject(forKey: $0.rawValue) }
}
#else
UserDefaultsKey.allCases.filter { $0 != .pushToken }.forEach { UserDefaults.standard.removeObject(forKey: $0.rawValue) }
#endif
}
}