Skip to content

Commit

Permalink
Pass session expiration to register (#798)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarrencev authored Oct 1, 2024
1 parent 1124cf1 commit 5777d3c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/keychain/src/pages/session.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ import { useConnection } from "hooks/connection";
import { useRouter } from "next/router";
import { useCallback, useEffect } from "react";
import { LoginMode } from "components/connect/types";
import { SESSION_EXPIRATION } from "const";

type SessionResponse = {
username: string;
address: string;
expires_at: string;
ownerGuid: string;
transactionHash?: string;
alreadyRegistered?: boolean;
Expand Down Expand Up @@ -99,6 +101,7 @@ export default function Session() {
address: controller.address,
ownerGuid: controller.account.cartridge.ownerGuid(),
transactionHash: transaction_hash,
expires_at: String(SESSION_EXPIRATION),
});
},
[
Expand Down Expand Up @@ -126,6 +129,7 @@ export default function Session() {
address: controller.address,
ownerGuid: controller.account.cartridge.ownerGuid(),
alreadyRegistered: true,
expires_at: String(SESSION_EXPIRATION),
});
}
}, [controller, origin, policies, queries.public_key, onCallback]);
Expand Down

0 comments on commit 5777d3c

Please sign in to comment.