Skip to content

Commit f77e36a

Browse files
authored
Merge pull request #3834 from wmathurin/dev
Aligning logout reasons with Android
2 parents 05cf7d5 + 5342fe2 commit f77e36a

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

libs/SalesforceSDKCore/SalesforceSDKCore/Classes/UserAccount/SFUserAccountManager.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1574,8 +1574,9 @@ - (void)setCurrentUserInternal:(SFUserAccount*)user {
15741574
NSArray *keys = [self.userAccountMap allKeys];
15751575
for (SFUserAccountIdentity *identity in keys) {
15761576
// Logout any other user with Biometric Authentication
1577+
// This is an unexpected logout(s) because we only support one Bio Auth user.
15771578
if ([bioAuthManager checkForPolicyWithUserId:identity.userId] && ![identity isEqual:[self currentUserIdentity]]) {
1578-
[self logoutUser:[self userAccountForUserIdentity:identity] reason:SFLogoutReasonRefreshTokenRotated];
1579+
[self logoutUser:[self userAccountForUserIdentity:identity] reason:SFLogoutReasonUnexpected];
15791580
}
15801581
}
15811582
}
@@ -1821,7 +1822,7 @@ - (void)retrievedIdentityData:(SFSDKAuthSession *)authSession {
18211822
if (preLoginCredentials != nil && ![preLoginCredentials.refreshToken isEqualToString:self.currentUser.credentials.refreshToken]) {
18221823

18231824
id<SFSDKOAuthProtocol> authClient = self.authClient();
1824-
[authClient revokeRefreshToken:preLoginCredentials reason:SFLogoutReasonUnknown];
1825+
[authClient revokeRefreshToken:preLoginCredentials reason:SFLogoutReasonRefreshTokenRotated];
18251826
}
18261827
} else if (hasMobilePolicy) {
18271828
[SFSDKAppFeatureMarkers registerAppFeature:kSFAppFeatureScreenLock];

0 commit comments

Comments
 (0)