Skip to content

Commit

Permalink
fix: Ensure we always use the ES256 key for EBSI auth
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jul 16, 2024
1 parent 130721b commit be7dc15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/ebsi-support/src/functions/Attestation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ export const ebsiCreateAttestationAuthRequestURL = async (
}
// This only works if the DID is actually registered, otherwise use our internal KMS;
// that is why the offline argument is passed in when type is Verifiable Auth to Onboard, as no DID is present at that point yet
// We are getting the ES256 key here, as that is the one needed for auth in EBSI
const authKey = await getAuthenticationKey(
{ identifier, offlineWhenNoDIDRegistered: credentialType === 'VerifiableAuthorisationToOnboard', noVerificationMethodFallback: true },
{ identifier, offlineWhenNoDIDRegistered: credentialType === 'VerifiableAuthorisationToOnboard', noVerificationMethodFallback: true, keyType: 'Secp256r1' },
context,
)
const kid = authKey.meta?.jwkThumbprint ?? calculateJwkThumbprintForKey({ key: authKey })
Expand Down

0 comments on commit be7dc15

Please sign in to comment.