Page MenuHomePhabricator

D5885.id19447.diff
No OneTemporary

D5885.id19447.diff

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

Mime Type
text/plain
Expires
Sat, Dec 21, 5:51 AM (18 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2684096
Default Alt Text
D5885.id19447.diff (806 B)

Event Timeline