Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2835658
D8753.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D8753.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
@@ -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
Details
Attached
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)
Attached To
Mode
D8753: [keyserver] Add doNotRegister flag to siwe_auth endpoint
Attached
Detach File
Event Timeline
Log In to Comment