File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
GoInfoGame/GoInfoGame/Login Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 66//
77
88import Foundation
9+ import UIKit
910
1011//@MainActor
1112final class SessionManager : ObservableObject {
@@ -38,6 +39,11 @@ final class SessionManager: ObservableObject {
3839 self ? . username = username
3940 _ = KeychainManager . save ( key: " accessToken " , data: response. accessToken)
4041 self ? . lastLoginPassword = password
42+ UserDefaults . standard. setValue ( response. expiresIn, forKey: " accessToken_expire_in " )
43+ UserDefaults . standard. setValue ( Date ( ) . timeIntervalSince1970, forKey: " accessToken_Generate " )
44+ if let appDelegate = UIApplication . shared. delegate as? AppDelegate {
45+ appDelegate. validateAccessToken ( )
46+ }
4147
4248 self ? . isLoginSuccessful = true
4349 self ? . hasLoginFailed = false
You can’t perform that action at this time.
0 commit comments