Merge branch 'IDTEAM-1.26.0' into 'main'
[ProtonMail-WebClient.git] / packages / shared / lib / webauthn / id.ts
blobfbd024dc1e9d7e0f391bcfb76ea088cf8cf944dd
1 import { encodeBase64URL, uint8ArrayToString } from '@proton/shared/lib/helpers/encoding';
2 import type { RegisteredKey } from '@proton/shared/lib/webauthn/interface';
4 export const getId = (registeredKey: RegisteredKey) => {
5     return encodeBase64URL(uint8ArrayToString(new Uint8Array(registeredKey.CredentialID)));
6 };