From dfe563dfc0044300c6a0d2380319d5c1f24bb2b7 Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Sat, 13 Jul 2024 20:17:02 +0700 Subject: [PATCH] Workaround[auth]: don't match accessible attribute Trying to workaround weird issue with SEP-less palera1n environment (iOS 16.7+ on A11) --- Natives/authenticator/MicrosoftAuthenticator.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Natives/authenticator/MicrosoftAuthenticator.m b/Natives/authenticator/MicrosoftAuthenticator.m index c85ac7d26d..5ab25a74b0 100644 --- a/Natives/authenticator/MicrosoftAuthenticator.m +++ b/Natives/authenticator/MicrosoftAuthenticator.m @@ -244,7 +244,6 @@ + (NSDictionary *)keychainQueryForKey:(NSString *)profile extraInfo:(NSDictionar (id)kSecClass: (id)kSecClassGenericPassword, (id)kSecAttrService: @"AccountToken", (id)kSecAttrAccount: profile, - (id)kSecAttrAccessible: (id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly }.mutableCopy; if (extra) { [dict addEntriesFromDictionary:extra]; @@ -281,6 +280,7 @@ - (BOOL)setAccessToken:(NSString *)accessToken refreshToken:(NSString *)refreshT @"refreshToken": refreshToken, } requiringSecureCoding:YES error:nil]; NSDictionary *dict = [MicrosoftAuthenticator keychainQueryForKey:self.authData[@"xuid"] extraInfo:@{ + (id)kSecAttrAccessible: (id)kSecAttrAccessibleWhenUnlockedThisDeviceOnly, (id)kSecValueData: data }]; SecItemDelete((__bridge CFDictionaryRef)dict);