From 5f751cb19ddfa55ef47b43d5175bfed2fe591e30 Mon Sep 17 00:00:00 2001 From: Alec Ananian <1013230+alecananian@users.noreply.github.com> Date: Wed, 8 Jan 2025 12:06:06 -0800 Subject: [PATCH] auth: expect account signature expiration time in verify payload --- .changeset/small-cherries-retire.md | 5 +++++ packages/core/src/connect/auth.ts | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 .changeset/small-cherries-retire.md diff --git a/.changeset/small-cherries-retire.md b/.changeset/small-cherries-retire.md new file mode 100644 index 00000000..5a4dfe6b --- /dev/null +++ b/.changeset/small-cherries-retire.md @@ -0,0 +1,5 @@ +--- +"@treasure-dev/tdk-core": minor +--- + +Expect account signature expiration time in verify payload diff --git a/packages/core/src/connect/auth.ts b/packages/core/src/connect/auth.ts index 310ba8e2..ff453a49 100644 --- a/packages/core/src/connect/auth.ts +++ b/packages/core/src/connect/auth.ts @@ -26,8 +26,7 @@ export const generateAccountSignature = async ({ signature: await backendWalletAccount.signMessage({ message: JSON.stringify({ accountAddress: accountAddress.toLowerCase(), - // TODO: include expirationTime when partners can adopt it - // expirationTime, + expirationTime, }), }), expirationTime, @@ -51,7 +50,7 @@ export const verifyAccountSignature = async ({ hash: hashMessage( JSON.stringify({ accountAddress: accountAddress.toLowerCase(), - // expirationTime, + expirationTime, }), ), signature,