Skip to content

Commit

Permalink
fix: set generated nonce in signature params
Browse files Browse the repository at this point in the history
  • Loading branch information
horsefacts committed Aug 19, 2024
1 parent 9d2a98f commit 7090c90
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/long-islands-dream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@farcaster/auth-relay": patch
---

fix: set generated nonce in signature params
2 changes: 1 addition & 1 deletion apps/relay/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function createChannel(request: FastifyRequest<{ Body: CreateChanne
nonce,
url,
connectUri: url,
signatureParams: request.body,
signatureParams: { ...request.body, nonce },
});
if (update.isOk()) {
return reply.code(201).send({ channelToken, url, connectUri: url, nonce });
Expand Down
1 change: 1 addition & 0 deletions apps/relay/src/server.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,7 @@ describe("relay server", () => {
expect(nonce).toMatch(/[a-zA-Z0-9]{16}/);
expect(rest).toStrictEqual({
signatureParams: {
nonce,
domain: "example.com",
siweUri: "https://example.com",
},
Expand Down

0 comments on commit 7090c90

Please sign in to comment.