Skip to content

Commit febbd86

Browse files
committed
Update use-seam-client.ts
1 parent d29c7d3 commit febbd86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/hooks/use-seam-client.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ export const useSeamClient = ({
2020
// backend generated client access token
2121
setCookie(`seam-clientSessionToken-${userIdentifierKey}`, clientSessionToken, 30)
2222
const seam = new Seam({
23-
apiKey: clientSessionToken,
23+
clientSessionToken: clientSessionToken,
2424
endpoint,
2525
})
2626
return seam
2727
} else if (clientSessionTokenFromCookie) {
2828
// already have client access token from cookie
2929
// no need to use public key
3030
const seam = new Seam({
31-
apiKey: clientSessionTokenFromCookie,
31+
clientSessionToken: clientSessionTokenFromCookie,
3232
endpoint,
3333
})
3434
// TODO: check if client access token is valid (not expired), if expired/invalid, get new one with the public key
@@ -46,7 +46,7 @@ export const useSeamClient = ({
4646
}
4747
setCookie(`seam-clientSessionToken-${userIdentifierKey}`, clientSessionToken, 30)
4848
const seam = new Seam({
49-
apiKey: clientSessionToken,
49+
clientSessionToken: clientSessionToken,
5050
endpoint: endpoint,
5151
})
5252
return seam

0 commit comments

Comments
 (0)