File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ class AuthManager: IterableAuthManagerProtocol {
16
16
self . dateProvider = dateProvider
17
17
self . expirationRefreshPeriod = expirationRefreshPeriod
18
18
19
- if self . delegate != nil {
19
+ if self . delegate != nil && ( localStorage . email != nil || localStorage . userId != nil ) {
20
20
retrieveAuthToken ( )
21
21
}
22
22
}
Original file line number Diff line number Diff line change @@ -431,6 +431,7 @@ class AuthTests: XCTestCase {
431
431
let localStorage = MockLocalStorage ( )
432
432
433
433
localStorage. authToken = mockEncodedPayload
434
+ localStorage. userId = AuthTests . userId
434
435
435
436
let authManager = AuthManager ( delegate: authDelegate,
436
437
expirationRefreshPeriod: expirationRefreshPeriod,
@@ -457,6 +458,7 @@ class AuthTests: XCTestCase {
457
458
458
459
let mockLocalStorage = MockLocalStorage ( )
459
460
mockLocalStorage. authToken = mockEncodedPayload
461
+ mockLocalStorage. email = AuthTests . email
460
462
461
463
let authManager = AuthManager ( delegate: authDelegate,
462
464
expirationRefreshPeriod: expirationRefreshPeriod,
You can’t perform that action at this time.
0 commit comments