@spfn/auth 0.2.0-beta.51 → 0.2.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server.js +4 -0
- package/dist/server.js.map +1 -1
- package/package.json +4 -4
package/dist/server.js
CHANGED
|
@@ -7086,6 +7086,10 @@ function getKeyExpiryDate() {
|
|
|
7086
7086
|
}
|
|
7087
7087
|
async function registerPublicKeyService(params) {
|
|
7088
7088
|
const { userId, keyId, publicKey, fingerprint, algorithm = "ES256" } = params;
|
|
7089
|
+
const existing = await keysRepository.findActiveByKeyId(keyId);
|
|
7090
|
+
if (existing) {
|
|
7091
|
+
return;
|
|
7092
|
+
}
|
|
7089
7093
|
const isValidFingerprint = verifyKeyFingerprint(publicKey, fingerprint);
|
|
7090
7094
|
if (!isValidFingerprint) {
|
|
7091
7095
|
throw new InvalidKeyFingerprintError();
|