@choiceform/shared-auth 0.1.3 → 0.1.4

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/LICENSE.md ADDED
@@ -0,0 +1,149 @@
1
+ # License
2
+
3
+ Portions of this software are licensed as follows:
4
+
5
+ - Content of branches other than the main branch are not licensed.
6
+ - Source code files that contain `.ee.` in their filename or `.ee` in their directory name are NOT licensed under the Sustainable Use License. To use source code files that contain `.ee.` in their filename or `.ee` in their directory name you must hold a valid Rungraf Enterprise License specifically allowing you access to such source code files and as defined in "LICENSE_EE.md".
7
+ - All third party components incorporated into the Rungraf software are licensed under the original license provided by the owner of the applicable component.
8
+ - Content outside of the above mentioned files or restrictions is available under the "Sustainable Use License" as defined below.
9
+
10
+ ---
11
+
12
+ ## Sustainable Use License
13
+
14
+ **Version 1.0**
15
+
16
+ ### Acceptance
17
+
18
+ By using the software, you agree to all of the terms and conditions below.
19
+
20
+ ### Copyright License
21
+
22
+ The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations below.
23
+
24
+ ### Limitations
25
+
26
+ You may use or modify the software only for your own internal business purposes or for non-commercial or personal use. You may distribute the software or provide it to others only if you do so free of charge for non-commercial purposes. You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor's trademarks is subject to applicable law.
27
+
28
+ ### Patents
29
+
30
+ The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
31
+
32
+ ### Notices
33
+
34
+ You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms. If you modify the software, you must include in any modified copies of the software a prominent notice stating that you have modified the software.
35
+
36
+ ### No Other Rights
37
+
38
+ These terms do not imply any licenses other than those expressly granted in these terms.
39
+
40
+ ### Termination
41
+
42
+ If you use the software in violation of these terms, such use is not licensed, and your license will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your license will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your license to terminate automatically and permanently.
43
+
44
+ ### No Liability
45
+
46
+ As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
47
+
48
+ ### Definitions
49
+
50
+ - The **"licensor"** is the entity offering these terms, which is the Rungraf project and its contributors.
51
+
52
+ - The **"software"** is the software the licensor makes available under these terms, including any portion of it.
53
+
54
+ - **"You"** refers to the individual or entity agreeing to these terms.
55
+
56
+ - **"Your company"** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. Control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
57
+
58
+ - **"Your license"** is the license granted to you for the software under these terms.
59
+
60
+ - **"Use"** means anything you do with the software requiring your license.
61
+
62
+ - **"Trademark"** means trademarks, service marks, and similar rights.
63
+
64
+ ---
65
+
66
+ ## Additional Terms for Rungraf
67
+
68
+ In addition to the Sustainable Use License terms above, the following specific limitations apply to Rungraf:
69
+
70
+ ### Multi-Tenant SaaS Restriction
71
+
72
+ You may NOT use Rungraf to operate a multi-tenant Software-as-a-Service (SaaS) offering where you provide Rungraf as a hosted service to multiple external customers or organizations, unless you obtain a separate commercial license from the Rungraf project.
73
+
74
+ **Examples of PROHIBITED use without commercial license:**
75
+ - Operating "AI Agent Platform as a Service" for multiple paying customers
76
+ - Providing Rungraf as a white-labeled workflow automation service
77
+ - Running a marketplace where multiple organizations build AI Agents on your hosted Rungraf instance
78
+
79
+ **Examples of PERMITTED use:**
80
+ - Deploying Rungraf within your organization for your employees and internal use
81
+ - Embedding Rungraf in your product where each customer gets their own dedicated Rungraf instance
82
+ - Using Rungraf as a backend service for your own application (single-tenant)
83
+
84
+ **Workspace Definition:** Within Rungraf, one workspace represents one tenant. A workspace provides an isolated environment for each tenant's AI Agents, workflows, data, and configurations.
85
+
86
+ ### Branding and Attribution
87
+
88
+ When using Rungraf's frontend interface, you may not remove, alter, or obscure the Rungraf logo, branding, or copyright notices displayed in the user interface. This restriction applies only to the visual frontend components.
89
+
90
+ **Frontend Definition:** The "frontend" of Rungraf includes all components located in the `packages/client/` directory when running from source code, or the "client" Docker image when running via containers.
91
+
92
+ **Examples of PERMITTED use:**
93
+ - Using only Rungraf's backend APIs with your own custom frontend (no branding requirement)
94
+ - Forking and customizing the codebase while maintaining attribution
95
+ - White-labeling with a separate commercial license
96
+
97
+ **Examples of PROHIBITED use:**
98
+ - Using the Rungraf frontend with logos and branding removed
99
+ - Distributing modified versions without proper attribution
100
+
101
+ ### Core Engine Protection
102
+
103
+ The Rungraf AI Agent Runtime (located in `packages/runner/`) and Expression Engine may be used and modified for your own purposes, but you may NOT:
104
+
105
+ - Extract the Agent Runtime as a standalone product and sell it separately
106
+ - Use Rungraf's core orchestration engine to build a competing workflow automation platform for sale
107
+ - Offer the Expression Engine as a standalone commercial service
108
+
109
+ **Examples of PERMITTED use:**
110
+ - Integrating Rungraf into your product's backend
111
+ - Modifying the runtime for your specific use case
112
+ - Contributing improvements back to the open source project
113
+
114
+ **Examples of PROHIBITED use:**
115
+ - Packaging the Elixir Agent Runtime as "SuperAgent Engine" and selling it
116
+ - Building a competitor workflow platform using Rungraf's core code
117
+
118
+ ---
119
+
120
+ ## Fair Code Principles
121
+
122
+ Rungraf follows the [Fair Code](https://faircode.io) principles. We believe in:
123
+
124
+ 1. **Transparency**: Source code is publicly available for review and contribution
125
+ 2. **Sustainability**: Protecting the project's ability to fund ongoing development
126
+ 3. **Community**: Encouraging contributions while preventing exploitation
127
+ 4. **Freedom**: Allowing use for internal business purposes and non-commercial projects
128
+
129
+ ---
130
+
131
+ ## Getting a Commercial License
132
+
133
+ If your use case falls under the restrictions above, you can obtain a commercial Rungraf Enterprise License. Enterprise licenses include:
134
+
135
+ - Multi-tenant SaaS deployment rights
136
+ - White-labeling permissions
137
+ - Priority support and SLA guarantees
138
+ - Enterprise features (SSO, advanced RBAC, audit logs)
139
+ - Custom development support
140
+
141
+ Contact us for enterprise licensing:
142
+ - **Email**: [enterprise@rungraf.io](mailto:enterprise@rungraf.io)
143
+ - **Website**: [https://rungraf.io/enterprise](https://rungraf.io/enterprise)
144
+
145
+ ---
146
+
147
+ **© 2024-2025 Rungraf Project**
148
+
149
+ This software is provided "as is", without warranty of any kind, express or implied.
package/README.md CHANGED
@@ -487,6 +487,11 @@ A: 不配置 `VITE_AUTH_API_URL` 环境变量即可。功能会静默跳过。
487
487
 
488
488
  ## 更新日志
489
489
 
490
+ ### v0.1.4
491
+
492
+ - 🔧 改进:移除所有 token 编码,保持与 URL 传入的 token 格式完全一致
493
+ - 📝 改进:所有 API 请求中的 token 不再进行 `encodeURIComponent` 编码
494
+
490
495
  ### v0.1.2
491
496
 
492
497
  - ✨ 新增:登录时自动获取并设置伴生团队功能
@@ -1 +1 @@
1
- {"version":3,"file":"auth-sync.d.ts","sourceRoot":"","sources":["../../src/components/auth-sync.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAuS3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,QA0FxD"}
1
+ {"version":3,"file":"auth-sync.d.ts","sourceRoot":"","sources":["../../src/components/auth-sync.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAoS3C;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,YAAY,CAAA;CAAE,QA0FxD"}
@@ -114,16 +114,14 @@ async function setupCompanionTeam(auth, token, refetchSession) {
114
114
  }
115
115
  return;
116
116
  }
117
- // 4. Token 编码(与 fetchSessionWithToken 保持一致)
118
- const encodedToken = encodeURIComponent(oneAuthToken);
119
- // 5. 获取组织信息
117
+ // 4. 获取组织信息
120
118
  const myOrganizationUrl = `${oneAuthBaseUrl}/v1/organizations/me`;
121
119
  if (isDev) {
122
120
  console.log("[AuthSync] Fetching organization from:", myOrganizationUrl);
123
121
  }
124
122
  const orgResponse = await fetch(myOrganizationUrl, {
125
123
  headers: {
126
- Authorization: `Bearer ${encodedToken}`,
124
+ Authorization: `Bearer ${oneAuthToken}`,
127
125
  "Content-Type": "application/json",
128
126
  },
129
127
  });
@@ -158,7 +156,7 @@ async function setupCompanionTeam(auth, token, refetchSession) {
158
156
  const setActiveOrgResponse = await fetch(setActiveOrgUrl, {
159
157
  method: "POST",
160
158
  headers: {
161
- Authorization: `Bearer ${encodedToken}`,
159
+ Authorization: `Bearer ${oneAuthToken}`,
162
160
  "Content-Type": "application/json",
163
161
  },
164
162
  body: JSON.stringify({ organizationId: organization.id }),
@@ -178,7 +176,7 @@ async function setupCompanionTeam(auth, token, refetchSession) {
178
176
  const setActiveTeamResponse = await fetch(setActiveTeamUrl, {
179
177
  method: "POST",
180
178
  headers: {
181
- Authorization: `Bearer ${encodedToken}`,
179
+ Authorization: `Bearer ${oneAuthToken}`,
182
180
  "Content-Type": "application/json",
183
181
  },
184
182
  body: JSON.stringify({ teamId: firstTeam.id }),
@@ -199,7 +197,7 @@ async function setupCompanionTeam(auth, token, refetchSession) {
199
197
  const getSessionUrl = `${authBaseURL}/v1/auth/get-session`;
200
198
  const sessionResponse = await fetch(getSessionUrl, {
201
199
  headers: {
202
- Authorization: `Bearer ${encodedToken}`,
200
+ Authorization: `Bearer ${oneAuthToken}`,
203
201
  "Content-Type": "application/json",
204
202
  },
205
203
  });
package/dist/core.d.ts CHANGED
@@ -600,13 +600,13 @@ export declare function createAuth(config: AuthConfig): {
600
600
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
601
601
  status: boolean;
602
602
  user: {
603
- id: any;
604
- email: any;
605
- name: any;
606
- image: any;
607
- emailVerified: any;
608
- createdAt: any;
609
- updatedAt: any;
603
+ id: string;
604
+ email: string;
605
+ name: string;
606
+ image: string | null | undefined;
607
+ emailVerified: boolean;
608
+ createdAt: Date;
609
+ updatedAt: Date;
610
610
  };
611
611
  } | {
612
612
  status: boolean;
@@ -1800,7 +1800,7 @@ export declare function createAuth(config: AuthConfig): {
1800
1800
  userId?: string | undefined;
1801
1801
  } & {
1802
1802
  fetchOptions?: FetchOptions | undefined;
1803
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").OAuth2Tokens, {
1803
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<any, {
1804
1804
  code?: string;
1805
1805
  message?: string;
1806
1806
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -1938,7 +1938,7 @@ export declare function createAuth(config: AuthConfig): {
1938
1938
  } & {
1939
1939
  fetchOptions?: FetchOptions | undefined;
1940
1940
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1941
- user: import("better-auth").OAuth2UserInfo;
1941
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
1942
1942
  data: Record<string, any>;
1943
1943
  }, {
1944
1944
  code?: string;
@@ -2055,6 +2055,7 @@ export declare function createAuth(config: AuthConfig): {
2055
2055
  };
2056
2056
  } | null;
2057
2057
  isPending: boolean;
2058
+ isRefetching: boolean;
2058
2059
  error: import("@better-fetch/fetch").BetterFetchError | null;
2059
2060
  refetch: (queryParams?: {
2060
2061
  query?: import("better-auth").SessionQueryParams;
@@ -2100,13 +2101,13 @@ export declare function createAuth(config: AuthConfig): {
2100
2101
  onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
2101
2102
  };
2102
2103
  })[];
2103
- redirect?: RequestRedirect | undefined;
2104
2104
  method: string;
2105
2105
  headers?: (HeadersInit & (HeadersInit | {
2106
2106
  accept: "application/json" | "text/plain" | "application/octet-stream";
2107
2107
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2108
2108
  authorization: "Bearer" | "Basic";
2109
2109
  })) | undefined;
2110
+ redirect?: RequestRedirect | undefined;
2110
2111
  cache?: RequestCache | undefined;
2111
2112
  credentials?: RequestCredentials;
2112
2113
  integrity?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAE1C;;GAEG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAsCq+e,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAwz0W,CAAC;mCAAyD,CAAC;oCAA0D,CAAC;iCAAuD,CAAC;;;;;;;;;;;;;;;;;;;;;;;yBAA9K,CAAC;+BAAyD,CAAC;gCAA0D,CAAC;6BAAuD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAAv+0W,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAA1+a,CAAC;qBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBAA2hD,CAAC;;;;;oBAAwW,CAAC;iBAA4C,CAAC;uBAA+C,CAAC;qBAAuC,CAAC;qBAAuC,CAAC;gBAAmC,CAAC;oBAA2C,CAAC;oBAA+C,CAAC;0BAA4C,CAAC;kBAA4C,CAAC;kBAAkD,CAAC;mBAAmC,CAAC;uBAA4G,CAAC;6BAA6B,CAAC;;mBAAiD,CAAC;;;iBAAqH,CAAC;gBAAmC,CAAC;;;;;;;;;;;;gBAA+iB,CAAC;iBAAoB,CAAC;kBAAqB,CAAC;kBAAqB,CAAC;;iBAAsG,CAAC;wBAAoE,CAAC;kBAAoC,CAAC;uBAAqG,CAAC;6BAA6E,CAAC;;;2BAA0F,CAAC;mHAA6K,CAAC;;;;;;;EAJx/L;AAED,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAA"}
package/dist/init.d.ts CHANGED
@@ -606,13 +606,13 @@ export declare function initAuth(config: {
606
606
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
607
607
  status: boolean;
608
608
  user: {
609
- id: any;
610
- email: any;
611
- name: any;
612
- image: any;
613
- emailVerified: any;
614
- createdAt: any;
615
- updatedAt: any;
609
+ id: string;
610
+ email: string;
611
+ name: string;
612
+ image: string | null | undefined;
613
+ emailVerified: boolean;
614
+ createdAt: Date;
615
+ updatedAt: Date;
616
616
  };
617
617
  } | {
618
618
  status: boolean;
@@ -1806,7 +1806,7 @@ export declare function initAuth(config: {
1806
1806
  userId?: string | undefined;
1807
1807
  } & {
1808
1808
  fetchOptions?: FetchOptions | undefined;
1809
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").OAuth2Tokens, {
1809
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<any, {
1810
1810
  code?: string;
1811
1811
  message?: string;
1812
1812
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -1944,7 +1944,7 @@ export declare function initAuth(config: {
1944
1944
  } & {
1945
1945
  fetchOptions?: FetchOptions | undefined;
1946
1946
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1947
- user: import("better-auth").OAuth2UserInfo;
1947
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
1948
1948
  data: Record<string, any>;
1949
1949
  }, {
1950
1950
  code?: string;
@@ -2061,6 +2061,7 @@ export declare function initAuth(config: {
2061
2061
  };
2062
2062
  } | null;
2063
2063
  isPending: boolean;
2064
+ isRefetching: boolean;
2064
2065
  error: import("@better-fetch/fetch").BetterFetchError | null;
2065
2066
  refetch: (queryParams?: {
2066
2067
  query?: import("better-auth").SessionQueryParams;
@@ -2106,13 +2107,13 @@ export declare function initAuth(config: {
2106
2107
  onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
2107
2108
  };
2108
2109
  })[];
2109
- redirect?: RequestRedirect | undefined;
2110
2110
  method: string;
2111
2111
  headers?: (HeadersInit & (HeadersInit | {
2112
2112
  accept: "application/json" | "text/plain" | "application/octet-stream";
2113
2113
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2114
2114
  authorization: "Bearer" | "Basic";
2115
2115
  })) | undefined;
2116
+ redirect?: RequestRedirect | undefined;
2116
2117
  cache?: RequestCache | undefined;
2117
2118
  credentials?: RequestCredentials;
2118
2119
  integrity?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../src/init.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAG1C;;GAEG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE;IAC/B,OAAO,EA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BAAkD,CAAC;mBAAmC,CAAC;uBAA4G,CAAC;6BAA6B,CAAC;;mBAAiD,CAAC;;;iBAAqH,CAAC;gBAAmC,CAAC;;;;;;;;;;;;gBAA+iB,CAAC;iBAAoB,CAAC;kBAAqB,CAAC;kBAAqB,CAAC;;iBAAsG,CAAC;wBAAoE,CAAC;kBAAoC,CAAC;uBAAqG,CAAC;6BAA6E,CAAC;;;2BAA0F,CAAC;mHAA6K,CAAC;;;;;;;EAFtzM"}
@@ -568,13 +568,13 @@ export declare function createAuthClientFromConfig(config: AuthConfig): {
568
568
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<NonNullable<void | {
569
569
  status: boolean;
570
570
  user: {
571
- id: any;
572
- email: any;
573
- name: any;
574
- image: any;
575
- emailVerified: any;
576
- createdAt: any;
577
- updatedAt: any;
571
+ id: string;
572
+ email: string;
573
+ name: string;
574
+ image: string | null | undefined;
575
+ emailVerified: boolean;
576
+ createdAt: Date;
577
+ updatedAt: Date;
578
578
  };
579
579
  } | {
580
580
  status: boolean;
@@ -1768,7 +1768,7 @@ export declare function createAuthClientFromConfig(config: AuthConfig): {
1768
1768
  userId?: string | undefined;
1769
1769
  } & {
1770
1770
  fetchOptions?: FetchOptions | undefined;
1771
- }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<import("better-auth").OAuth2Tokens, {
1771
+ }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<any, {
1772
1772
  code?: string;
1773
1773
  message?: string;
1774
1774
  }, FetchOptions["throw"] extends true ? true : false>>;
@@ -1906,7 +1906,7 @@ export declare function createAuthClientFromConfig(config: AuthConfig): {
1906
1906
  } & {
1907
1907
  fetchOptions?: FetchOptions | undefined;
1908
1908
  }>, data_1?: FetchOptions | undefined) => Promise<import("@better-fetch/fetch").BetterFetchResponse<{
1909
- user: import("better-auth").OAuth2UserInfo;
1909
+ user: packages_core_dist_oauth2.OAuth2UserInfo;
1910
1910
  data: Record<string, any>;
1911
1911
  }, {
1912
1912
  code?: string;
@@ -2023,6 +2023,7 @@ export declare function createAuthClientFromConfig(config: AuthConfig): {
2023
2023
  };
2024
2024
  } | null;
2025
2025
  isPending: boolean;
2026
+ isRefetching: boolean;
2026
2027
  error: import("@better-fetch/fetch").BetterFetchError | null;
2027
2028
  refetch: (queryParams?: {
2028
2029
  query?: import("better-auth").SessionQueryParams;
@@ -2068,13 +2069,13 @@ export declare function createAuthClientFromConfig(config: AuthConfig): {
2068
2069
  onSuccess(context: import("@better-fetch/fetch").SuccessContext<any>): void;
2069
2070
  };
2070
2071
  })[];
2071
- redirect?: RequestRedirect | undefined;
2072
2072
  method: string;
2073
2073
  headers?: (HeadersInit & (HeadersInit | {
2074
2074
  accept: "application/json" | "text/plain" | "application/octet-stream";
2075
2075
  "content-type": "application/json" | "text/plain" | "application/x-www-form-urlencoded" | "multipart/form-data" | "application/octet-stream";
2076
2076
  authorization: "Bearer" | "Basic";
2077
2077
  })) | undefined;
2078
+ redirect?: RequestRedirect | undefined;
2078
2079
  cache?: RequestCache | undefined;
2079
2080
  credentials?: RequestCredentials;
2080
2081
  integrity?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"auth-client.d.ts","sourceRoot":"","sources":["../../src/lib/auth-client.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAE3C;;;;;;;;;;GAUG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;6BA6Bqkf,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAAwz0W,CAAC;+BAAyD,CAAC;gCAA0D,CAAC;6BAAuD,CAAC;;;;;;;;;;;;;;;;;;;;;;;qBAA9K,CAAC;2BAAyD,CAAC;4BAA0D,CAAC;yBAAuD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;yBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAAD,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6BAA1+a,CAAC;iBAAqB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eAA2hD,CAAC;;;;;gBAAwW,CAAC;aAA4C,CAAC;mBAA+C,CAAC;iBAAuC,CAAC;iBAAuC,CAAC;YAAmC,CAAC;gBAA2C,CAAC;gBAA+C,CAAC;sBAA4C,CAAC;cAA4C,CAAC;cAAkD,CAAC;eAAmC,CAAC;mBAA4G,CAAC;yBAA6B,CAAC;;eAAiD,CAAC;;;aAAqH,CAAC;YAAmC,CAAC;;;;;;;;;;;;YAA+iB,CAAC;aAAoB,CAAC;cAAqB,CAAC;cAAqB,CAAC;;aAAsG,CAAC;oBAAoE,CAAC;cAAoC,CAAC;mBAAqG,CAAC;yBAA6E,CAAC;;;uBAA0F,CAAC;+GAA6K,CAAC;;;;;;EAFxmM"}
@@ -104,7 +104,7 @@ export function createAuthActions(authStore, tokenStorage, config, authClient) {
104
104
  const response = await fetch(endpoint, {
105
105
  method: "GET",
106
106
  headers: {
107
- Authorization: `Bearer ${encodeURIComponent(token)}`,
107
+ Authorization: `Bearer ${token}`,
108
108
  "Content-Type": "application/json",
109
109
  },
110
110
  });
@@ -89,7 +89,7 @@ export async function getAuthHeaders(authStore, tokenStorage, authActions, authC
89
89
  return {};
90
90
  }
91
91
  return {
92
- Authorization: `Bearer ${encodeURIComponent(token)}`,
92
+ Authorization: `Bearer ${token}`,
93
93
  };
94
94
  }
95
95
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@choiceform/shared-auth",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Shared authentication package for Choiceform projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -16,12 +16,6 @@
16
16
  "dist",
17
17
  "README.md"
18
18
  ],
19
- "scripts": {
20
- "build": "tsc",
21
- "dev": "tsc --watch",
22
- "clean": "rimraf dist",
23
- "prepublishOnly": "pnpm run build"
24
- },
25
19
  "repository": {
26
20
  "type": "git",
27
21
  "url": "git+https://github.com/choiceform/automation.git",
@@ -57,6 +51,10 @@
57
51
  "@types/react-dom": "18.2.22",
58
52
  "typescript": "^5.5.3",
59
53
  "rimraf": "^6.0.1"
54
+ },
55
+ "scripts": {
56
+ "build": "tsc",
57
+ "dev": "tsc --watch",
58
+ "clean": "rimraf dist"
60
59
  }
61
- }
62
-
60
+ }