Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3503623
D5885.id19660.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
806 B
Referenced Files
None
Subscribers
None
D5885.id19660.diff
View Options
diff --git a/keyserver/src/responders/siwe-nonce-responders.js b/keyserver/src/responders/siwe-nonce-responders.js
--- a/keyserver/src/responders/siwe-nonce-responders.js
+++ b/keyserver/src/responders/siwe-nonce-responders.js
@@ -1,7 +1,11 @@
// @flow
-async function siweNonceResponder(): Promise<string> {
- return 'UNIMPLEMENTED';
+import { generateNonce } from 'siwe';
+
+import type { SIWENonceResponse } from 'lib/types/siwe-types.js';
+
+async function siweNonceResponder(): Promise<SIWENonceResponse> {
+ return { nonce: generateNonce() };
}
export { siweNonceResponder };
diff --git a/lib/types/siwe-types.js b/lib/types/siwe-types.js
new file mode 100644
--- /dev/null
+++ b/lib/types/siwe-types.js
@@ -0,0 +1,5 @@
+// @flow
+
+export type SIWENonceResponse = {
+ +nonce: string,
+};
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 5:56 AM (18 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684096
Default Alt Text
D5885.id19660.diff (806 B)
Attached To
Mode
D5885: [keyserver] Return generated `nonce` in `siweNonceResponder`
Attached
Detach File
Event Timeline
Log In to Comment