diff --git a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift index c578060aaa..fa897dde68 100644 --- a/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift +++ b/AmplifyPlugins/Auth/Sources/AWSCognitoAuthPlugin/CredentialStorage/AWSCognitoAuthCredentialStore.swift @@ -55,7 +55,7 @@ struct AWSCognitoAuthCredentialStore { let oldAccessGroup = retrieveStoredAccessGroup() if migrateKeychainItemsOfUserSession { try? migrateKeychainItemsToAccessGroup() - } else if oldAccessGroup == nil && oldAccessGroup != accessGroup{ + } else if oldAccessGroup == nil && oldAccessGroup != accessGroup { try? KeychainStore(service: service)._removeAll() } diff --git a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/CredentialStore/MockCredentialStoreBehavior.swift b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/CredentialStore/MockCredentialStoreBehavior.swift index d0ca03f00b..97b9201818 100644 --- a/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/CredentialStore/MockCredentialStoreBehavior.swift +++ b/AmplifyPlugins/Auth/Tests/AWSCognitoAuthPluginUnitTests/ActionTests/CredentialStore/MockCredentialStoreBehavior.swift @@ -16,7 +16,6 @@ class MockKeychainStoreBehavior: KeychainStoreBehavior { let data: String let removeAllHandler: VoidHandler? - let mockKey: String = "mockKey" init(data: String, removeAllHandler: VoidHandler? = nil) { @@ -42,5 +41,4 @@ class MockKeychainStoreBehavior: KeychainStoreBehavior { func _removeAll() throws { removeAllHandler?() } - }