@insforge/react 1.0.5-dev.5 → 1.0.7

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/dist/index.d.cts CHANGED
@@ -19,7 +19,16 @@ interface InitialAuthState {
19
19
  userId?: string | null;
20
20
  }
21
21
  interface InsforgeProviderProps {
22
+ /**
23
+ * The base URL of the InsForge backend.
24
+ * @deprecated This prop is no longer used.
25
+ * Use the client prop instead.
26
+ */
27
+ baseUrl?: string;
22
28
  children: ReactNode;
29
+ /**
30
+ * The InsForge SDK client instance.
31
+ */
23
32
  client: InsForgeClient;
24
33
  /**
25
34
  * URL to redirect to after successful sign in (when token is detected in URL)
@@ -46,13 +55,16 @@ interface InsforgeProviderProps {
46
55
  * ```tsx
47
56
  * // Basic usage (React/Vite)
48
57
  * import { InsforgeProvider } from '@insforge/react';
58
+ * import { createClient } from '@insforge/sdk';
59
+ *
60
+ * const client = createClient({
61
+ * baseUrl: import.meta.env.VITE_INSFORGE_BASE_URL,
62
+ * });
49
63
  *
50
- * export default function App() {
64
+ * export default function MyApp() {
51
65
  * return (
52
- * <InsforgeProvider
53
- * baseUrl={import.meta.env.VITE_INSFORGE_BASE_URL}
54
- * >
55
- * {children}
66
+ * <InsforgeProvider client={client}>
67
+ * <App />
56
68
  * </InsforgeProvider>
57
69
  * );
58
70
  * }
@@ -62,7 +74,8 @@ interface InsforgeProviderProps {
62
74
  * ```tsx
63
75
  * // With cookie sync (Next.js optimization)
64
76
  * <InsforgeProvider
65
- * baseUrl={baseUrl}
77
+ * client={client}
78
+ * afterSignInUrl="/dashboard"
66
79
  * onSignIn={async (authToken) => {
67
80
  * await signIn(authToken);
68
81
  * }}
package/dist/index.d.ts CHANGED
@@ -19,7 +19,16 @@ interface InitialAuthState {
19
19
  userId?: string | null;
20
20
  }
21
21
  interface InsforgeProviderProps {
22
+ /**
23
+ * The base URL of the InsForge backend.
24
+ * @deprecated This prop is no longer used.
25
+ * Use the client prop instead.
26
+ */
27
+ baseUrl?: string;
22
28
  children: ReactNode;
29
+ /**
30
+ * The InsForge SDK client instance.
31
+ */
23
32
  client: InsForgeClient;
24
33
  /**
25
34
  * URL to redirect to after successful sign in (when token is detected in URL)
@@ -46,13 +55,16 @@ interface InsforgeProviderProps {
46
55
  * ```tsx
47
56
  * // Basic usage (React/Vite)
48
57
  * import { InsforgeProvider } from '@insforge/react';
58
+ * import { createClient } from '@insforge/sdk';
59
+ *
60
+ * const client = createClient({
61
+ * baseUrl: import.meta.env.VITE_INSFORGE_BASE_URL,
62
+ * });
49
63
  *
50
- * export default function App() {
64
+ * export default function MyApp() {
51
65
  * return (
52
- * <InsforgeProvider
53
- * baseUrl={import.meta.env.VITE_INSFORGE_BASE_URL}
54
- * >
55
- * {children}
66
+ * <InsforgeProvider client={client}>
67
+ * <App />
56
68
  * </InsforgeProvider>
57
69
  * );
58
70
  * }
@@ -62,7 +74,8 @@ interface InsforgeProviderProps {
62
74
  * ```tsx
63
75
  * // With cookie sync (Next.js optimization)
64
76
  * <InsforgeProvider
65
- * baseUrl={baseUrl}
77
+ * client={client}
78
+ * afterSignInUrl="/dashboard"
66
79
  * onSignIn={async (authToken) => {
67
80
  * await signIn(authToken);
68
81
  * }}