Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3112312
D6915.id23344.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
D6915.id23344.diff
View Options
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();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 1, 5:03 PM (19 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2399449
Default Alt Text
D6915.id23344.diff (3 KB)
Attached To
Mode
D6915: [native] Include `signedIdentityKeysBlob` in `login`/`register`/`siwe_auth` requests
Attached
Detach File
Event Timeline
Log In to Comment