diff --git a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Common/SalesforceSDKManager.m b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Common/SalesforceSDKManager.m index 1794f77c12..4641f08957 100644 --- a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Common/SalesforceSDKManager.m +++ b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/Common/SalesforceSDKManager.m @@ -467,7 +467,7 @@ - (NSString *)devInfoTitleString [presentedViewController presentViewController:devInfo animated:NO completion:nil]; }], [[SFSDKDevAction alloc]initWith:@"Logout" handler:^{ - [[SFUserAccountManager sharedInstance] logout]; + [[SFUserAccountManager sharedInstance] logout:SFLogoutReasonUserInitiated]; }], [[SFSDKDevAction alloc]initWith:@"Switch user" handler:^{ SFDefaultUserManagementViewController *umvc = [[SFDefaultUserManagementViewController alloc] initWithCompletionBlock:^(SFUserManagementAction action) { diff --git a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m index 9a70930b85..46f37dbb4c 100644 --- a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m +++ b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/RestAPI/SFRestAPI.m @@ -255,7 +255,7 @@ - (void)send:(SFRestRequest *)request requestDelegate:(id attributes[@"errorCode"] = [NSNumber numberWithInteger:error.code]; attributes[@"errorDescription"] = error.localizedDescription; [SFSDKEventBuilderHelper createAndStoreEvent:@"userLogout" userAccount:nil className:NSStringFromClass([strongSelf class]) attributes:attributes]; - [[SFUserAccountManager sharedInstance] logout]; + [[SFUserAccountManager sharedInstance] logout:SFLogoutReasonUnexpected]; }]; } else { [self enqueueRequest:request requestDelegate:requestDelegate shouldRetry:shouldRetry]; diff --git a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/UserAccount/ViewControllers/SFDefaultUserManagementViewController.m b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/UserAccount/ViewControllers/SFDefaultUserManagementViewController.m index 129546182d..18f2863eaa 100644 --- a/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/UserAccount/ViewControllers/SFDefaultUserManagementViewController.m +++ b/libs/SalesforceSDKCore/SalesforceSDKCore/Classes/UserAccount/ViewControllers/SFDefaultUserManagementViewController.m @@ -74,7 +74,7 @@ - (void)viewDidDisappear:(BOOL)animated - (void)actionLogout { - [[SFUserAccountManager sharedInstance] logout]; + [[SFUserAccountManager sharedInstance] logout:SFLogoutReasonUserInitiated]; } - (void)actionSwitchUser:(SFUserAccount *)user