From 549ebed326b39c01f0022bea0e94cca7822bd80c Mon Sep 17 00:00:00 2001 From: jangseoyoung Date: Wed, 1 Dec 2021 13:11:28 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=80=20::=20(#96)=20Logout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/View/MyPage/MyPageViewController.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/View/MyPage/MyPageViewController.swift b/Sources/View/MyPage/MyPageViewController.swift index 787df35..9135ccc 100644 --- a/Sources/View/MyPage/MyPageViewController.swift +++ b/Sources/View/MyPage/MyPageViewController.swift @@ -9,10 +9,13 @@ import UIKit import SnapKit import Then +import KeychainSwift +import Loaf class MyPageViewController: UIViewController { private let viewModel = MyPageViewModel() + private let keychain = KeychainSwift() private lazy var profileImageView = UIImageView().then { $0.image = R.image.profileImage() @@ -142,6 +145,9 @@ extension MyPageViewController: UITableViewDelegate, UITableViewDataSource { navigationController?.pushViewController(LikedProductViewController(), animated: true) case [1, 1]: navigationController?.pushViewController(EditProfileViewController(), animated: true) + case [1, 2]: + self.keychain.delete("ACCESS-TOKEN") + self.view.window?.rootViewController = LoginViewController() default: break }