Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F32919628
D6908.1768219077.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D6908.1768219077.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
@@ -24,7 +24,10 @@
notificationTypeValues,
logInActionSources,
} from 'lib/types/account-types.js';
-import type { IdentityKeysBlob } from 'lib/types/crypto-types.js';
+import type {
+ IdentityKeysBlob,
+ SignedIdentityKeysBlob,
+} from 'lib/types/crypto-types.js';
import type { CalendarQuery } from 'lib/types/entry-types.js';
import { defaultNumberPerThread } from 'lib/types/message-types.js';
import type {
@@ -217,12 +220,20 @@
+userID: string,
+calendarQuery: ?CalendarQuery,
+socialProof?: ?SIWESocialProof,
+ +signedIdentityKeysBlob?: ?SignedIdentityKeysBlob,
};
async function processSuccessfulLogin(
params: ProcessSuccessfulLoginParams,
): Promise<LogInResponse> {
- const { viewer, input, userID, calendarQuery, socialProof } = params;
+ const {
+ viewer,
+ input,
+ userID,
+ calendarQuery,
+ socialProof,
+ signedIdentityKeysBlob,
+ } = params;
const request: LogInRequest = input;
const newServerTime = Date.now();
@@ -234,6 +245,7 @@
platformDetails: request.platformDetails,
deviceToken,
socialProof,
+ signedIdentityKeysBlob,
}),
fetchNotAcknowledgedPolicies(userID, baseLegalPolicies),
deleteCookie(viewer.cookieID),
@@ -396,6 +408,7 @@
input,
userID: id,
calendarQuery,
+ signedIdentityKeysBlob,
});
}
diff --git a/keyserver/src/session/cookies.js b/keyserver/src/session/cookies.js
--- a/keyserver/src/session/cookies.js
+++ b/keyserver/src/session/cookies.js
@@ -8,6 +8,7 @@
import { hasMinCodeVersion } from 'lib/shared/version-utils.js';
import type { Shape } from 'lib/types/core.js';
+import type { SignedIdentityKeysBlob } from 'lib/types/crypto-types.js';
import type { Platform, PlatformDetails } from 'lib/types/device-types.js';
import type { CalendarQuery } from 'lib/types/entry-types.js';
import {
@@ -649,6 +650,7 @@
platformDetails: PlatformDetails,
deviceToken?: ?string,
socialProof?: ?SIWESocialProof,
+ signedIdentityKeysBlob?: ?SignedIdentityKeysBlob,
};
// The result of this function should never be passed directly to the Viewer
@@ -662,7 +664,8 @@
userID: string,
params: UserCookieCreationParams,
): Promise<UserViewerData> {
- const { platformDetails, deviceToken, socialProof } = params;
+ const { platformDetails, deviceToken, socialProof, signedIdentityKeysBlob } =
+ params;
const { platform, ...versions } = platformDetails || defaultPlatformDetails;
const versionsString =
Object.keys(versions).length > 0 ? JSON.stringify(versions) : null;
@@ -685,10 +688,11 @@
deviceToken,
versionsString,
JSON.stringify(socialProof),
+ signedIdentityKeysBlob ? JSON.stringify(signedIdentityKeysBlob) : null,
];
const query = SQL`
INSERT INTO cookies(id, hash, user, platform, creation_time, last_used,
- device_token, versions, social_proof)
+ device_token, versions, social_proof, signed_identity_keys)
VALUES ${[cookieRow]}
`;
await dbQuery(query);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 12, 11:57 AM (17 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5923014
Default Alt Text
D6908.1768219077.diff (3 KB)
Attached To
Mode
D6908: [keyserver] Persist `signedIdentityKeysBlob` in `keyserver` on `login`
Attached
Detach File
Event Timeline
Log In to Comment