Page MenuHomePhabricator

D8753.diff
No OneTemporary

D8753.diff

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
@@ -532,6 +532,7 @@
watchedIDs: t.list(tID),
signedIdentityKeysBlob: t.maybe(signedIdentityKeysBlobValidator),
initialNotificationsEncryptedMessage: t.maybe(t.String),
+ doNotRegister: t.maybe(t.Boolean),
});
async function siweAuthResponder(
@@ -545,6 +546,7 @@
platformDetails,
signedIdentityKeysBlob,
initialNotificationsEncryptedMessage,
+ doNotRegister,
} = request;
const calendarQuery = normalizeCalendarQuery(request.calendarQuery);
@@ -633,7 +635,9 @@
// 8. Create account with call to `processSIWEAccountCreation(...)`
// if address does not correspond to an existing user.
let userID = await fetchUserIDForEthereumAddress(siweMessage.address);
- if (!userID) {
+ if (!userID && doNotRegister) {
+ throw new ServerError('account_does_not_exist');
+ } else if (!userID) {
const siweAccountCreationRequest = {
address: siweMessage.address,
calendarQuery,
diff --git a/lib/types/siwe-types.js b/lib/types/siwe-types.js
--- a/lib/types/siwe-types.js
+++ b/lib/types/siwe-types.js
@@ -21,6 +21,7 @@
+watchedIDs: $ReadOnlyArray<string>,
+signedIdentityKeysBlob?: ?SignedIdentityKeysBlob,
+initialNotificationsEncryptedMessage?: string,
+ +doNotRegister?: boolean,
};
export type SIWEAuthServerCall = {

File Metadata

Mime Type
text/plain
Expires
Sun, Sep 29, 2:19 PM (22 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2201006
Default Alt Text
D8753.diff (1 KB)

Event Timeline