diff --git a/keyserver/src/responders/user-responders.js b/keyserver/src/responders/user-responders.js --- a/keyserver/src/responders/user-responders.js +++ b/keyserver/src/responders/user-responders.js @@ -43,6 +43,7 @@ getPublicKeyFromSIWEStatement, isValidSIWEMessage, isValidSIWEStatementWithPublicKey, + primaryIdentityPublicKeyRegex, } from 'lib/utils/siwe-utils.js'; import { tShape, @@ -50,6 +51,7 @@ tPassword, tEmail, tOldValidUsername, + tRegex, } from 'lib/utils/validation-utils'; import { @@ -302,6 +304,7 @@ deviceTokenUpdateRequest: t.maybe(deviceTokenUpdateRequestInputValidator), platformDetails: tPlatformDetails, source: t.maybe(t.enums.of(values(logInActionSources))), + primaryIdentityPublicKey: t.maybe(tRegex(primaryIdentityPublicKeyRegex)), }); async function logInResponder( diff --git a/lib/utils/siwe-utils.js b/lib/utils/siwe-utils.js --- a/lib/utils/siwe-utils.js +++ b/lib/utils/siwe-utils.js @@ -102,6 +102,7 @@ siweStatementWithoutPublicKey, isValidSIWENonce, isValidEthereumAddress, + primaryIdentityPublicKeyRegex, isValidPrimaryIdentityPublicKey, createSIWEMessage, isValidSIWEMessage,