mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 06:13:38 +00:00
Dynamically load MacOS passkey (#12897)
This commit is contained in:
@@ -30,21 +30,24 @@ void runSync(void* context, NSDictionary *params) {
|
|||||||
[mappedCredentials addObject:credential];
|
[mappedCredentials addObject:credential];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ([type isEqualToString:@"fido2"]) {
|
if (@available(macos 14, *)) {
|
||||||
NSString *cipherId = credential[@"cipherId"];
|
if ([type isEqualToString:@"fido2"]) {
|
||||||
NSString *rpId = credential[@"rpId"];
|
NSString *cipherId = credential[@"cipherId"];
|
||||||
NSString *userName = credential[@"userName"];
|
NSString *rpId = credential[@"rpId"];
|
||||||
NSData *credentialId = decodeBase64URL(credential[@"credentialId"]);
|
NSString *userName = credential[@"userName"];
|
||||||
NSData *userHandle = decodeBase64URL(credential[@"userHandle"]);
|
NSData *credentialId = decodeBase64URL(credential[@"credentialId"]);
|
||||||
|
NSData *userHandle = decodeBase64URL(credential[@"userHandle"]);
|
||||||
|
|
||||||
ASPasskeyCredentialIdentity *credential = [[ASPasskeyCredentialIdentity alloc]
|
Class passkeyCredentialIdentityClass = NSClassFromString(@"ASPasskeyCredentialIdentity");
|
||||||
initWithRelyingPartyIdentifier:rpId
|
id credential = [[passkeyCredentialIdentityClass alloc]
|
||||||
userName:userName
|
initWithRelyingPartyIdentifier:rpId
|
||||||
credentialID:credentialId
|
userName:userName
|
||||||
userHandle:userHandle
|
credentialID:credentialId
|
||||||
recordIdentifier:cipherId];
|
userHandle:userHandle
|
||||||
|
recordIdentifier:cipherId];
|
||||||
|
|
||||||
[mappedCredentials addObject:credential];
|
[mappedCredentials addObject:credential];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user