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 @@ -193,6 +193,11 @@ deviceToken: t.String, }); +const signedIdentityKeysBlobValidator = tShape({ + payload: t.String, + signature: t.String, +}); + const registerRequestInputValidator = tShape({ username: t.String, email: t.maybe(tEmail), @@ -203,6 +208,7 @@ // We include `primaryIdentityPublicKey` to avoid breaking // old clients, but we no longer do anything with it. primaryIdentityPublicKey: t.maybe(tRegex(primaryIdentityPublicKeyRegex)), + signedIdentityKeysBlob: t.maybe(signedIdentityKeysBlobValidator), }); async function accountCreationResponder( @@ -317,11 +323,6 @@ return response; } -const signedIdentityKeysBlobValidator = tShape({ - payload: t.String, - signature: t.String, -}); - const logInRequestInputValidator = tShape({ username: t.maybe(t.String), usernameOrEmail: t.maybe(t.union([tEmail, tOldValidUsername])), diff --git a/lib/types/account-types.js b/lib/types/account-types.js --- a/lib/types/account-types.js +++ b/lib/types/account-types.js @@ -40,7 +40,6 @@ ...LogInExtraInfo, +username: string, +password: string, - +primaryIdentityPublicKey?: string, }; type DeviceTokenUpdateRequest = { @@ -103,7 +102,6 @@ export type LogInExtraInfo = { +calendarQuery: CalendarQuery, +deviceTokenUpdateRequest?: ?DeviceTokenUpdateRequest, - +primaryIdentityPublicKey?: string, +signedIdentityKeysBlob?: SignedIdentityKeysBlob, }; diff --git a/native/account/siwe-panel.react.js b/native/account/siwe-panel.react.js --- a/native/account/siwe-panel.react.js +++ b/native/account/siwe-panel.react.js @@ -139,8 +139,7 @@ const handleSIWE = React.useCallback( async ({ message, signature }) => { - const { primaryIdentityPublicKey: publicKey, ...extraInfo } = - await logInExtraInfo(); + const extraInfo = await logInExtraInfo(); dispatchActionPromise( siweAuthActionTypes, diff --git a/native/selectors/account-selectors.js b/native/selectors/account-selectors.js --- a/native/selectors/account-selectors.js +++ b/native/selectors/account-selectors.js @@ -4,6 +4,7 @@ import { logInExtraInfoSelector } from 'lib/selectors/account-selectors.js'; import type { LogInExtraInfo } from 'lib/types/account-types.js'; +import type { SignedIdentityKeysBlob } from 'lib/types/crypto-types.js'; import type { UserPolicies } from 'lib/types/policy-types.js'; import { values } from 'lib/utils/objects.js'; @@ -24,12 +25,15 @@ ) => { const loginExtraFuncWithIdentityKey = async () => { await commCoreModule.initializeCryptoAccount(); - const { - primaryIdentityPublicKeys: { ed25519 }, - } = await commCoreModule.getUserPublicKey(); + const { blobPayload, signature } = + await commCoreModule.getUserPublicKey(); + const signedIdentityKeysBlob: SignedIdentityKeysBlob = { + payload: blobPayload, + signature, + }; return { ...logInExtraInfoFunc(calendarActive), - primaryIdentityPublicKey: ed25519, + signedIdentityKeysBlob, }; }; return loginExtraFuncWithIdentityKey; diff --git a/web/account/traditional-login-form.react.js b/web/account/traditional-login-form.react.js --- a/web/account/traditional-login-form.react.js +++ b/web/account/traditional-login-form.react.js @@ -109,7 +109,6 @@ username, password, logInActionSource: logInActionSources.logInFromWebForm, - primaryIdentityPublicKey: primaryIdentityPublicKeys.ed25519, signedIdentityKeysBlob, }); modalContext.popModal();