@turnkey/sdk-react 1.0.14 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/dist/contexts/TurnkeyContext.d.ts +8 -2
- package/dist/contexts/TurnkeyContext.d.ts.map +1 -1
- package/dist/contexts/TurnkeyContext.js +33 -1
- package/dist/contexts/TurnkeyContext.js.map +1 -1
- package/dist/contexts/TurnkeyContext.mjs +34 -2
- package/dist/contexts/TurnkeyContext.mjs.map +1 -1
- package/dist/hooks/use-session.d.ts +41 -0
- package/dist/hooks/use-session.d.ts.map +1 -0
- package/dist/hooks/use-session.js +55 -0
- package/dist/hooks/use-session.js.map +1 -0
- package/dist/hooks/use-session.mjs +53 -0
- package/dist/hooks/use-session.mjs.map +1 -0
- package/dist/hooks/{useTurnkey.d.ts → use-turnkey.d.ts} +1 -1
- package/dist/hooks/use-turnkey.d.ts.map +1 -0
- package/dist/hooks/{useTurnkey.js → use-turnkey.js} +1 -1
- package/dist/hooks/use-turnkey.js.map +1 -0
- package/dist/hooks/{useTurnkey.mjs → use-turnkey.mjs} +1 -1
- package/dist/hooks/use-turnkey.mjs.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +4 -2
- package/dist/hooks/useTurnkey.d.ts.map +0 -1
- package/dist/hooks/useTurnkey.js.map +0 -1
- package/dist/hooks/useTurnkey.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @turnkey/sdk-react
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- @turnkey/sdk-browser@1.10.1
|
|
8
|
+
- @turnkey/wallet-stamper@1.0.0
|
|
9
|
+
|
|
10
|
+
## 1.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- The `useTurnkey` hook now returns the new `walletClient`, used for authenticating requests via wallet signatures
|
|
15
|
+
- Added new `client` object returned from the `useTurnkey` hook. This is the authenticated client. It will be null if the user is not authenticated. Example:
|
|
16
|
+
|
|
17
|
+
```typescript
|
|
18
|
+
const { client } = useTurnkey();
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [8bea78f]
|
|
24
|
+
- @turnkey/wallet-stamper@2.0.0
|
|
25
|
+
- @turnkey/sdk-browser@1.10.0
|
|
26
|
+
|
|
3
27
|
## 1.0.14
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
import { Turnkey, TurnkeyIframeClient, TurnkeyPasskeyClient, TurnkeySDKBrowserConfig, TurnkeyBrowserClient } from "@turnkey/sdk-browser";
|
|
2
|
+
import { Turnkey, TurnkeyIframeClient, TurnkeyPasskeyClient, TurnkeySDKBrowserConfig, TurnkeyBrowserClient, TurnkeyWalletClient } from "@turnkey/sdk-browser";
|
|
3
|
+
import type { WalletInterface } from "@turnkey/wallet-stamper";
|
|
3
4
|
export interface TurnkeyClientType {
|
|
5
|
+
client: TurnkeyBrowserClient | undefined;
|
|
4
6
|
turnkey: Turnkey | undefined;
|
|
5
7
|
authIframeClient: TurnkeyIframeClient | undefined;
|
|
6
8
|
passkeyClient: TurnkeyPasskeyClient | undefined;
|
|
9
|
+
walletClient: TurnkeyWalletClient | undefined;
|
|
7
10
|
getActiveClient: () => Promise<TurnkeyBrowserClient | undefined>;
|
|
8
11
|
}
|
|
9
12
|
export declare const TurnkeyContext: import("react").Context<TurnkeyClientType>;
|
|
13
|
+
type TurnkeyProviderConfig = TurnkeySDKBrowserConfig & {
|
|
14
|
+
wallet?: WalletInterface;
|
|
15
|
+
};
|
|
10
16
|
interface TurnkeyProviderProps {
|
|
11
17
|
children: ReactNode;
|
|
12
|
-
config:
|
|
18
|
+
config: TurnkeyProviderConfig;
|
|
13
19
|
}
|
|
14
20
|
export declare const TurnkeyProvider: React.FC<TurnkeyProviderProps>;
|
|
15
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TurnkeyContext.d.ts","sourceRoot":"","sources":["../../src/contexts/TurnkeyContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TurnkeyContext.d.ts","sourceRoot":"","sources":["../../src/contexts/TurnkeyContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAA8C,MAAM,OAAO,CAAC;AAC9E,OAAO,EACL,OAAO,EACP,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EAEpB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG/D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,oBAAoB,GAAG,SAAS,CAAC;IACzC,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,gBAAgB,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAClD,aAAa,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAChD,YAAY,EAAE,mBAAmB,GAAG,SAAS,CAAC;IAC9C,eAAe,EAAE,MAAM,OAAO,CAAC,oBAAoB,GAAG,SAAS,CAAC,CAAC;CAClE;AAED,eAAO,MAAM,cAAc,4CASzB,CAAC;AAEH,KAAK,qBAAqB,GAAG,uBAAuB,GAAG;IACrD,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B,CAAC;AAEF,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,qBAAqB,CAAC;CAC/B;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAkI1D,CAAC"}
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
4
|
var react = require('react');
|
|
5
5
|
var sdkBrowser = require('@turnkey/sdk-browser');
|
|
6
|
+
var useSession = require('../hooks/use-session.js');
|
|
6
7
|
|
|
7
8
|
const TurnkeyContext = react.createContext({
|
|
9
|
+
client: undefined,
|
|
8
10
|
turnkey: undefined,
|
|
9
11
|
passkeyClient: undefined,
|
|
10
12
|
authIframeClient: undefined,
|
|
13
|
+
walletClient: undefined,
|
|
11
14
|
getActiveClient: async () => {
|
|
12
15
|
return undefined;
|
|
13
16
|
},
|
|
@@ -15,7 +18,10 @@ const TurnkeyContext = react.createContext({
|
|
|
15
18
|
const TurnkeyProvider = ({ config, children, }) => {
|
|
16
19
|
const [turnkey, setTurnkey] = react.useState(undefined);
|
|
17
20
|
const [passkeyClient, setPasskeyClient] = react.useState(undefined);
|
|
21
|
+
const [walletClient, setWalletClient] = react.useState(undefined);
|
|
18
22
|
const [authIframeClient, setAuthIframeClient] = react.useState(undefined);
|
|
23
|
+
const [client, setClient] = react.useState(undefined);
|
|
24
|
+
const { session } = useSession.useUserSession();
|
|
19
25
|
const iframeInit = react.useRef(false);
|
|
20
26
|
const TurnkeyAuthIframeContainerId = "turnkey-auth-iframe-container-id";
|
|
21
27
|
const TurnkeyAuthIframeElementId = "turnkey-auth-iframe-element-id";
|
|
@@ -35,7 +41,7 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
35
41
|
// if not, check if there's a readWriteSession in localStorage, and try to initialize an iframeClient with it
|
|
36
42
|
const readWriteSession = await turnkey?.getReadWriteSession();
|
|
37
43
|
if (readWriteSession) {
|
|
38
|
-
const injected = await authIframeClient?.injectCredentialBundle(readWriteSession.
|
|
44
|
+
const injected = await authIframeClient?.injectCredentialBundle(readWriteSession.credentialBundle);
|
|
39
45
|
if (injected) {
|
|
40
46
|
await authIframeClient?.getWhoami({
|
|
41
47
|
organizationId: currentUser?.organization.organizationId ??
|
|
@@ -58,6 +64,9 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
58
64
|
const newTurnkey = new sdkBrowser.Turnkey(config);
|
|
59
65
|
setTurnkey(newTurnkey);
|
|
60
66
|
setPasskeyClient(newTurnkey.passkeyClient());
|
|
67
|
+
if (config.wallet) {
|
|
68
|
+
setWalletClient(newTurnkey.walletClient(config.wallet));
|
|
69
|
+
}
|
|
61
70
|
const newAuthIframeClient = await newTurnkey.iframeClient({
|
|
62
71
|
iframeContainer: document.getElementById(TurnkeyAuthIframeContainerId),
|
|
63
72
|
iframeUrl: "https://auth.turnkey.com",
|
|
@@ -67,10 +76,33 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
67
76
|
}
|
|
68
77
|
})();
|
|
69
78
|
}, []);
|
|
79
|
+
/**
|
|
80
|
+
* Effect hook that updates the active client based on the current session's authenticated client.
|
|
81
|
+
*
|
|
82
|
+
* This hook listens for changes in the `session` object. If the `session` contains an `authClient`,
|
|
83
|
+
* it determines which client was used for initial authentication by checking the `authClient` key.
|
|
84
|
+
* It then sets the corresponding client (either `authIframeClient`, `passkeyClient`, or `walletClient`)
|
|
85
|
+
* as the active client using the `setClient` function.
|
|
86
|
+
*
|
|
87
|
+
* If the `session` changes, the `authClient` will be recomputed and the active client will be
|
|
88
|
+
* updated accordingly.
|
|
89
|
+
*/
|
|
90
|
+
react.useEffect(() => {
|
|
91
|
+
if (session?.authClient) {
|
|
92
|
+
const client = {
|
|
93
|
+
[sdkBrowser.AuthClient.Iframe]: authIframeClient,
|
|
94
|
+
[sdkBrowser.AuthClient.Passkey]: passkeyClient,
|
|
95
|
+
[sdkBrowser.AuthClient.Wallet]: walletClient,
|
|
96
|
+
}[session?.authClient];
|
|
97
|
+
setClient(client);
|
|
98
|
+
}
|
|
99
|
+
}, [session]);
|
|
70
100
|
return (jsxRuntime.jsxs(TurnkeyContext.Provider, { value: {
|
|
101
|
+
client,
|
|
71
102
|
turnkey,
|
|
72
103
|
passkeyClient,
|
|
73
104
|
authIframeClient,
|
|
105
|
+
walletClient,
|
|
74
106
|
getActiveClient,
|
|
75
107
|
}, children: [children, jsxRuntime.jsx("div", { className: "", id: TurnkeyAuthIframeContainerId, style: { display: "none" } })] }));
|
|
76
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TurnkeyContext.js","sources":["../../src/contexts/TurnkeyContext.tsx"],"sourcesContent":[null],"names":["createContext","useState","useRef","useEffect","Turnkey","_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TurnkeyContext.js","sources":["../../src/contexts/TurnkeyContext.tsx"],"sourcesContent":[null],"names":["createContext","useState","useUserSession","useRef","useEffect","Turnkey","AuthClient","_jsxs","_jsx"],"mappings":";;;;;;;AAwBO,MAAM,cAAc,GAAGA,mBAAa,CAAoB;AAC7D,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,aAAa,EAAE,SAAS;AACxB,IAAA,gBAAgB,EAAE,SAAS;AAC3B,IAAA,YAAY,EAAE,SAAS;IACvB,eAAe,EAAE,YAAW;AAC1B,QAAA,OAAO,SAAS,CAAC;KAClB;AACF,CAAA,EAAE;AAWU,MAAA,eAAe,GAAmC,CAAC,EAC9D,MAAM,EACN,QAAQ,GACT,KAAI;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAGC,cAAQ,CAAsB,SAAS,CAAC,CAAC;IACvE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAGA,cAAQ,CAEhD,SAAS,CAAC,CAAC;IACb,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAGA,cAAQ,CAE9C,SAAS,CAAC,CAAC;IACb,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAGA,cAAQ,CAEtD,SAAS,CAAC,CAAC;IAEb,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAGA,cAAQ,CAClC,SAAS,CACV,CAAC;AAEF,IAAA,M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Z,eAAe;SAChB,EAEA,QAAA,EAAA,CAAA,QAAQ,EACTC,cACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,EAAE,EACZ,EAAE,EAAE,4BAA4B,EAChC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAA,CAC1B,CACsB,EAAA,CAAA,EAC1B;AACJ;;;;;"}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { createContext, useState, useRef, useEffect } from 'react';
|
|
3
|
-
import { Turnkey } from '@turnkey/sdk-browser';
|
|
3
|
+
import { Turnkey, AuthClient } from '@turnkey/sdk-browser';
|
|
4
|
+
import { useUserSession } from '../hooks/use-session.mjs';
|
|
4
5
|
|
|
5
6
|
const TurnkeyContext = createContext({
|
|
7
|
+
client: undefined,
|
|
6
8
|
turnkey: undefined,
|
|
7
9
|
passkeyClient: undefined,
|
|
8
10
|
authIframeClient: undefined,
|
|
11
|
+
walletClient: undefined,
|
|
9
12
|
getActiveClient: async () => {
|
|
10
13
|
return undefined;
|
|
11
14
|
},
|
|
@@ -13,7 +16,10 @@ const TurnkeyContext = createContext({
|
|
|
13
16
|
const TurnkeyProvider = ({ config, children, }) => {
|
|
14
17
|
const [turnkey, setTurnkey] = useState(undefined);
|
|
15
18
|
const [passkeyClient, setPasskeyClient] = useState(undefined);
|
|
19
|
+
const [walletClient, setWalletClient] = useState(undefined);
|
|
16
20
|
const [authIframeClient, setAuthIframeClient] = useState(undefined);
|
|
21
|
+
const [client, setClient] = useState(undefined);
|
|
22
|
+
const { session } = useUserSession();
|
|
17
23
|
const iframeInit = useRef(false);
|
|
18
24
|
const TurnkeyAuthIframeContainerId = "turnkey-auth-iframe-container-id";
|
|
19
25
|
const TurnkeyAuthIframeElementId = "turnkey-auth-iframe-element-id";
|
|
@@ -33,7 +39,7 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
33
39
|
// if not, check if there's a readWriteSession in localStorage, and try to initialize an iframeClient with it
|
|
34
40
|
const readWriteSession = await turnkey?.getReadWriteSession();
|
|
35
41
|
if (readWriteSession) {
|
|
36
|
-
const injected = await authIframeClient?.injectCredentialBundle(readWriteSession.
|
|
42
|
+
const injected = await authIframeClient?.injectCredentialBundle(readWriteSession.credentialBundle);
|
|
37
43
|
if (injected) {
|
|
38
44
|
await authIframeClient?.getWhoami({
|
|
39
45
|
organizationId: currentUser?.organization.organizationId ??
|
|
@@ -56,6 +62,9 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
56
62
|
const newTurnkey = new Turnkey(config);
|
|
57
63
|
setTurnkey(newTurnkey);
|
|
58
64
|
setPasskeyClient(newTurnkey.passkeyClient());
|
|
65
|
+
if (config.wallet) {
|
|
66
|
+
setWalletClient(newTurnkey.walletClient(config.wallet));
|
|
67
|
+
}
|
|
59
68
|
const newAuthIframeClient = await newTurnkey.iframeClient({
|
|
60
69
|
iframeContainer: document.getElementById(TurnkeyAuthIframeContainerId),
|
|
61
70
|
iframeUrl: "https://auth.turnkey.com",
|
|
@@ -65,10 +74,33 @@ const TurnkeyProvider = ({ config, children, }) => {
|
|
|
65
74
|
}
|
|
66
75
|
})();
|
|
67
76
|
}, []);
|
|
77
|
+
/**
|
|
78
|
+
* Effect hook that updates the active client based on the current session's authenticated client.
|
|
79
|
+
*
|
|
80
|
+
* This hook listens for changes in the `session` object. If the `session` contains an `authClient`,
|
|
81
|
+
* it determines which client was used for initial authentication by checking the `authClient` key.
|
|
82
|
+
* It then sets the corresponding client (either `authIframeClient`, `passkeyClient`, or `walletClient`)
|
|
83
|
+
* as the active client using the `setClient` function.
|
|
84
|
+
*
|
|
85
|
+
* If the `session` changes, the `authClient` will be recomputed and the active client will be
|
|
86
|
+
* updated accordingly.
|
|
87
|
+
*/
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
if (session?.authClient) {
|
|
90
|
+
const client = {
|
|
91
|
+
[AuthClient.Iframe]: authIframeClient,
|
|
92
|
+
[AuthClient.Passkey]: passkeyClient,
|
|
93
|
+
[AuthClient.Wallet]: walletClient,
|
|
94
|
+
}[session?.authClient];
|
|
95
|
+
setClient(client);
|
|
96
|
+
}
|
|
97
|
+
}, [session]);
|
|
68
98
|
return (jsxs(TurnkeyContext.Provider, { value: {
|
|
99
|
+
client,
|
|
69
100
|
turnkey,
|
|
70
101
|
passkeyClient,
|
|
71
102
|
authIframeClient,
|
|
103
|
+
walletClient,
|
|
72
104
|
getActiveClient,
|
|
73
105
|
}, children: [children, jsx("div", { className: "", id: TurnkeyAuthIframeContainerId, style: { display: "none" } })] }));
|
|
74
106
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TurnkeyContext.mjs","sources":["../../src/contexts/TurnkeyContext.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"TurnkeyContext.mjs","sources":["../../src/contexts/TurnkeyContext.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;AAwBO,MAAM,cAAc,GAAG,aAAa,CAAoB;AAC7D,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,OAAO,EAAE,SAAS;AAClB,IAAA,aAAa,EAAE,SAAS;AACxB,IAAA,gBAAgB,EAAE,SAAS;AAC3B,IAAA,YAAY,EAAE,SAAS;IACvB,eAAe,EAAE,YAAW;AAC1B,QAAA,OAAO,SAAS,CAAC;KAClB;AACF,CAAA,EAAE;AAWU,MAAA,eAAe,GAAmC,CAAC,EAC9D,MAAM,EACN,QAAQ,GACT,KAAI;IACH,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAsB,SAAS,CAAC,CAAC;IACvE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAEhD,SAAS,CAAC,CAAC;IACb,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAE9C,SAAS,CAAC,CAAC;IACb,MAAM,CAAC,gB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AAC,CAAC;AAEd,IAAA,QACEA,IAAC,CAAA,cAAc,CAAC,QAAQ,EAAA,EACtB,KAAK,EAAE;YACL,MAAM;YACN,OAAO;YACP,aAAa;YACb,gBAAgB;YAChB,YAAY;YACZ,eAAe;SAChB,EAEA,QAAA,EAAA,CAAA,QAAQ,EACTC,GACE,CAAA,KAAA,EAAA,EAAA,SAAS,EAAC,EAAE,EACZ,EAAE,EAAE,4BAA4B,EAChC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,EAAA,CAC1B,CACsB,EAAA,CAAA,EAC1B;AACJ;;;;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { User } from "@turnkey/sdk-browser";
|
|
2
|
+
interface UserSession {
|
|
3
|
+
user?: Omit<User, "session"> | undefined;
|
|
4
|
+
session?: User["session"];
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Hook for managing the user session stored in local storage.
|
|
8
|
+
* This hook is reactive and updates whenever the value in local storage changes.
|
|
9
|
+
*
|
|
10
|
+
* @returns {UserSession | undefined} An object containing user details and session information.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const { user, session } = useUserSession()
|
|
14
|
+
*
|
|
15
|
+
* if (user) {
|
|
16
|
+
* // user is defined and thus has previously logged in
|
|
17
|
+
* } else {
|
|
18
|
+
* // no user found in local storage
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* if (session?.read) {
|
|
22
|
+
* // session.read is defined therefore user is authenticated with a read session
|
|
23
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
24
|
+
* // Session is still valid
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* if (session?.write) {
|
|
29
|
+
* // session.write is defined therefore user is authenticated with a read/write session
|
|
30
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
31
|
+
* // Session is still valid
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* if (!session) {
|
|
36
|
+
* // no session, user is not authenticated
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
export declare function useUserSession(): UserSession;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=use-session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session.d.ts","sourceRoot":"","sources":["../../src/hooks/use-session.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAGzD,UAAU,WAAW;IACnB,IAAI,CAAC,EAAE,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAmB5C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var sdkBrowser = require('@turnkey/sdk-browser');
|
|
4
|
+
var usehooksTs = require('usehooks-ts');
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hook for managing the user session stored in local storage.
|
|
8
|
+
* This hook is reactive and updates whenever the value in local storage changes.
|
|
9
|
+
*
|
|
10
|
+
* @returns {UserSession | undefined} An object containing user details and session information.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* const { user, session } = useUserSession()
|
|
14
|
+
*
|
|
15
|
+
* if (user) {
|
|
16
|
+
* // user is defined and thus has previously logged in
|
|
17
|
+
* } else {
|
|
18
|
+
* // no user found in local storage
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* if (session?.read) {
|
|
22
|
+
* // session.read is defined therefore user is authenticated with a read session
|
|
23
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
24
|
+
* // Session is still valid
|
|
25
|
+
* }
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* if (session?.write) {
|
|
29
|
+
* // session.write is defined therefore user is authenticated with a read/write session
|
|
30
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
31
|
+
* // Session is still valid
|
|
32
|
+
* }
|
|
33
|
+
* }
|
|
34
|
+
*
|
|
35
|
+
* if (!session) {
|
|
36
|
+
* // no session, user is not authenticated
|
|
37
|
+
* }
|
|
38
|
+
*/
|
|
39
|
+
function useUserSession() {
|
|
40
|
+
const [user] = usehooksTs.useLocalStorage(sdkBrowser.StorageKeys.UserSession, undefined);
|
|
41
|
+
const { session, userId, username, organization } = user ?? {};
|
|
42
|
+
return {
|
|
43
|
+
user: userId && organization
|
|
44
|
+
? {
|
|
45
|
+
userId: userId ?? "",
|
|
46
|
+
username: username ?? "",
|
|
47
|
+
organization: organization ?? "",
|
|
48
|
+
}
|
|
49
|
+
: undefined,
|
|
50
|
+
session: session ?? undefined,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
exports.useUserSession = useUserSession;
|
|
55
|
+
//# sourceMappingURL=use-session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session.js","sources":["../../src/hooks/use-session.ts"],"sourcesContent":[null],"names":["useLocalStorage","StorageKeys"],"mappings":";;;;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;SACa,cAAc,GAAA;AAC5B,IAAA,MAAM,CAAC,IAAI,CAAC,GAAGA,0BAAe,CAC5BC,sBAAW,CAAC,WAAW,EACvB,SAAS,CACV,CAAC;AAEF,IAAA,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAE/D,OAAO;QACL,IAAI,EACF,MAAM,IAAI,YAAY;AACpB,cAAE;gBACE,MAAM,EAAE,MAAM,IAAI,EAAE;gBACpB,QAAQ,EAAE,QAAQ,IAAI,EAAE;gBACxB,YAAY,EAAE,YAAY,IAAI,EAAE;AACjC,aAAA;AACH,cAAE,SAAS;QACf,OAAO,EAAE,OAAO,IAAI,SAAS;KAC9B,CAAC;AACJ;;;;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { StorageKeys } from '@turnkey/sdk-browser';
|
|
2
|
+
import { useLocalStorage } from 'usehooks-ts';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Hook for managing the user session stored in local storage.
|
|
6
|
+
* This hook is reactive and updates whenever the value in local storage changes.
|
|
7
|
+
*
|
|
8
|
+
* @returns {UserSession | undefined} An object containing user details and session information.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const { user, session } = useUserSession()
|
|
12
|
+
*
|
|
13
|
+
* if (user) {
|
|
14
|
+
* // user is defined and thus has previously logged in
|
|
15
|
+
* } else {
|
|
16
|
+
* // no user found in local storage
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* if (session?.read) {
|
|
20
|
+
* // session.read is defined therefore user is authenticated with a read session
|
|
21
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
22
|
+
* // Session is still valid
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* if (session?.write) {
|
|
27
|
+
* // session.write is defined therefore user is authenticated with a read/write session
|
|
28
|
+
* if (session.expiry && Date.now() < session.expiry) {
|
|
29
|
+
* // Session is still valid
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* if (!session) {
|
|
34
|
+
* // no session, user is not authenticated
|
|
35
|
+
* }
|
|
36
|
+
*/
|
|
37
|
+
function useUserSession() {
|
|
38
|
+
const [user] = useLocalStorage(StorageKeys.UserSession, undefined);
|
|
39
|
+
const { session, userId, username, organization } = user ?? {};
|
|
40
|
+
return {
|
|
41
|
+
user: userId && organization
|
|
42
|
+
? {
|
|
43
|
+
userId: userId ?? "",
|
|
44
|
+
username: username ?? "",
|
|
45
|
+
organization: organization ?? "",
|
|
46
|
+
}
|
|
47
|
+
: undefined,
|
|
48
|
+
session: session ?? undefined,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { useUserSession };
|
|
53
|
+
//# sourceMappingURL=use-session.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session.mjs","sources":["../../src/hooks/use-session.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAQA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgCG;SACa,cAAc,GAAA;AAC5B,IAAA,MAAM,CAAC,IAAI,CAAC,GAAG,eAAe,CAC5B,WAAW,CAAC,WAAW,EACvB,SAAS,CACV,CAAC;AAEF,IAAA,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,IAAI,EAAE,CAAC;IAE/D,OAAO;QACL,IAAI,EACF,MAAM,IAAI,YAAY;AACpB,cAAE;gBACE,MAAM,EAAE,MAAM,IAAI,EAAE;gBACpB,QAAQ,EAAE,QAAQ,IAAI,EAAE;gBACxB,YAAY,EAAE,YAAY,IAAI,EAAE;AACjC,aAAA;AACH,cAAE,SAAS;QACf,OAAO,EAAE,OAAO,IAAI,SAAS;KAC9B,CAAC;AACJ;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export declare const useTurnkey: () => import("../contexts/TurnkeyContext").TurnkeyClientType;
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=use-turnkey.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-turnkey.d.ts","sourceRoot":"","sources":["../../src/hooks/use-turnkey.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,8DAMtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-turnkey.js","sources":["../../src/hooks/use-turnkey.ts"],"sourcesContent":[null],"names":["useContext","TurnkeyContext"],"mappings":";;;;;AAGO,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,6BAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACrE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AACjB;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-turnkey.mjs","sources":["../../src/hooks/use-turnkey.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACrE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AACjB;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { TurnkeyContext, TurnkeyProvider } from "./contexts/TurnkeyContext";
|
|
2
|
-
import { useTurnkey } from "./hooks/
|
|
2
|
+
import { useTurnkey } from "./hooks/use-turnkey";
|
|
3
3
|
export { TurnkeyContext, TurnkeyProvider, useTurnkey };
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@turnkey/sdk-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -38,7 +38,9 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"
|
|
41
|
+
"usehooks-ts": "^3.1.0",
|
|
42
|
+
"@turnkey/sdk-browser": "1.10.1",
|
|
43
|
+
"@turnkey/wallet-stamper": "1.0.0"
|
|
42
44
|
},
|
|
43
45
|
"peerDependencies": {
|
|
44
46
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTurnkey.d.ts","sourceRoot":"","sources":["../../src/hooks/useTurnkey.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,8DAMtB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTurnkey.js","sources":["../../src/hooks/useTurnkey.ts"],"sourcesContent":[null],"names":["useContext","TurnkeyContext"],"mappings":";;;;;AAGO,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,MAAM,OAAO,GAAGA,gBAAU,CAACC,6BAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACrE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AACjB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useTurnkey.mjs","sources":["../../src/hooks/useTurnkey.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAGO,MAAM,UAAU,GAAG,MAAK;AAC7B,IAAA,MAAM,OAAO,GAAG,UAAU,CAAC,cAAc,CAAC,CAAC;IAC3C,IAAI,CAAC,OAAO,EAAE;AACZ,QAAA,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAC;AACrE,KAAA;AACD,IAAA,OAAO,OAAO,CAAC;AACjB;;;;"}
|