better-auth 1.2.6-beta.5 → 1.2.6-beta.6

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.
Files changed (193) hide show
  1. package/dist/adapters/drizzle-adapter/index.d.cts +1 -1
  2. package/dist/adapters/drizzle-adapter/index.d.mts +1 -1
  3. package/dist/adapters/drizzle-adapter/index.d.ts +1 -1
  4. package/dist/adapters/kysely-adapter/index.d.cts +1 -1
  5. package/dist/adapters/kysely-adapter/index.d.mts +1 -1
  6. package/dist/adapters/kysely-adapter/index.d.ts +1 -1
  7. package/dist/adapters/memory-adapter/index.d.cts +1 -1
  8. package/dist/adapters/memory-adapter/index.d.mts +1 -1
  9. package/dist/adapters/memory-adapter/index.d.ts +1 -1
  10. package/dist/adapters/mongodb-adapter/index.d.cts +1 -1
  11. package/dist/adapters/mongodb-adapter/index.d.mts +1 -1
  12. package/dist/adapters/mongodb-adapter/index.d.ts +1 -1
  13. package/dist/adapters/prisma-adapter/index.d.cts +1 -1
  14. package/dist/adapters/prisma-adapter/index.d.mts +1 -1
  15. package/dist/adapters/prisma-adapter/index.d.ts +1 -1
  16. package/dist/adapters/test.d.cts +1 -1
  17. package/dist/adapters/test.d.mts +1 -1
  18. package/dist/adapters/test.d.ts +1 -1
  19. package/dist/api/index.cjs +2 -2
  20. package/dist/api/index.d.cts +1 -1
  21. package/dist/api/index.d.mts +1 -1
  22. package/dist/api/index.d.ts +1 -1
  23. package/dist/api/index.mjs +3 -3
  24. package/dist/client/index.d.cts +1 -1
  25. package/dist/client/index.d.mts +1 -1
  26. package/dist/client/index.d.ts +1 -1
  27. package/dist/client/plugins/index.d.cts +2 -2
  28. package/dist/client/plugins/index.d.mts +2 -2
  29. package/dist/client/plugins/index.d.ts +2 -2
  30. package/dist/client/react/index.d.cts +1 -1
  31. package/dist/client/react/index.d.mts +1 -1
  32. package/dist/client/react/index.d.ts +1 -1
  33. package/dist/client/solid/index.d.cts +1 -1
  34. package/dist/client/solid/index.d.mts +1 -1
  35. package/dist/client/solid/index.d.ts +1 -1
  36. package/dist/client/svelte/index.d.cts +1 -1
  37. package/dist/client/svelte/index.d.mts +1 -1
  38. package/dist/client/svelte/index.d.ts +1 -1
  39. package/dist/client/vue/index.d.cts +1 -1
  40. package/dist/client/vue/index.d.mts +1 -1
  41. package/dist/client/vue/index.d.ts +1 -1
  42. package/dist/cookies/index.d.cts +1 -1
  43. package/dist/cookies/index.d.mts +1 -1
  44. package/dist/cookies/index.d.ts +1 -1
  45. package/dist/db/index.d.cts +2 -2
  46. package/dist/db/index.d.mts +2 -2
  47. package/dist/db/index.d.ts +2 -2
  48. package/dist/index.cjs +2 -2
  49. package/dist/index.d.cts +2 -2
  50. package/dist/index.d.mts +2 -2
  51. package/dist/index.d.ts +2 -2
  52. package/dist/index.mjs +3 -3
  53. package/dist/integrations/next-js.cjs +4 -4
  54. package/dist/integrations/next-js.d.cts +1 -1
  55. package/dist/integrations/next-js.d.mts +1 -1
  56. package/dist/integrations/next-js.d.ts +1 -1
  57. package/dist/integrations/next-js.mjs +4 -4
  58. package/dist/integrations/node.d.cts +1 -1
  59. package/dist/integrations/node.d.mts +1 -1
  60. package/dist/integrations/node.d.ts +1 -1
  61. package/dist/integrations/svelte-kit.d.cts +1 -1
  62. package/dist/integrations/svelte-kit.d.mts +1 -1
  63. package/dist/integrations/svelte-kit.d.ts +1 -1
  64. package/dist/oauth2/index.cjs +2 -2
  65. package/dist/oauth2/index.d.cts +2 -2
  66. package/dist/oauth2/index.d.mts +2 -2
  67. package/dist/oauth2/index.d.ts +2 -2
  68. package/dist/oauth2/index.mjs +2 -2
  69. package/dist/plugins/admin/index.cjs +3 -3
  70. package/dist/plugins/admin/index.d.cts +284 -642
  71. package/dist/plugins/admin/index.d.mts +284 -642
  72. package/dist/plugins/admin/index.d.ts +284 -642
  73. package/dist/plugins/admin/index.mjs +3 -3
  74. package/dist/plugins/anonymous/index.cjs +2 -2
  75. package/dist/plugins/anonymous/index.d.cts +21 -34
  76. package/dist/plugins/anonymous/index.d.mts +21 -34
  77. package/dist/plugins/anonymous/index.d.ts +21 -34
  78. package/dist/plugins/anonymous/index.mjs +2 -2
  79. package/dist/plugins/bearer/index.cjs +2 -2
  80. package/dist/plugins/bearer/index.d.cts +1 -1
  81. package/dist/plugins/bearer/index.d.mts +1 -1
  82. package/dist/plugins/bearer/index.d.ts +1 -1
  83. package/dist/plugins/bearer/index.mjs +2 -2
  84. package/dist/plugins/custom-session/index.cjs +3 -3
  85. package/dist/plugins/custom-session/index.d.cts +22 -25
  86. package/dist/plugins/custom-session/index.d.mts +22 -25
  87. package/dist/plugins/custom-session/index.d.ts +22 -25
  88. package/dist/plugins/custom-session/index.mjs +3 -3
  89. package/dist/plugins/email-otp/index.cjs +2 -2
  90. package/dist/plugins/email-otp/index.d.cts +141 -260
  91. package/dist/plugins/email-otp/index.d.mts +141 -260
  92. package/dist/plugins/email-otp/index.d.ts +141 -260
  93. package/dist/plugins/email-otp/index.mjs +2 -2
  94. package/dist/plugins/generic-oauth/index.cjs +5 -6
  95. package/dist/plugins/generic-oauth/index.d.cts +64 -131
  96. package/dist/plugins/generic-oauth/index.d.mts +64 -131
  97. package/dist/plugins/generic-oauth/index.d.ts +64 -131
  98. package/dist/plugins/generic-oauth/index.mjs +5 -6
  99. package/dist/plugins/index.cjs +43 -12
  100. package/dist/plugins/index.d.cts +2 -2
  101. package/dist/plugins/index.d.mts +2 -2
  102. package/dist/plugins/index.d.ts +2 -2
  103. package/dist/plugins/index.mjs +44 -13
  104. package/dist/plugins/jwt/index.cjs +2 -2
  105. package/dist/plugins/jwt/index.d.cts +41 -108
  106. package/dist/plugins/jwt/index.d.mts +41 -108
  107. package/dist/plugins/jwt/index.d.ts +41 -108
  108. package/dist/plugins/jwt/index.mjs +2 -2
  109. package/dist/plugins/magic-link/index.cjs +2 -2
  110. package/dist/plugins/magic-link/index.d.cts +40 -82
  111. package/dist/plugins/magic-link/index.d.mts +40 -82
  112. package/dist/plugins/magic-link/index.d.ts +40 -82
  113. package/dist/plugins/magic-link/index.mjs +2 -2
  114. package/dist/plugins/multi-session/index.cjs +2 -2
  115. package/dist/plugins/multi-session/index.d.cts +61 -128
  116. package/dist/plugins/multi-session/index.d.mts +61 -128
  117. package/dist/plugins/multi-session/index.d.ts +61 -128
  118. package/dist/plugins/multi-session/index.mjs +2 -2
  119. package/dist/plugins/oauth-proxy/index.cjs +2 -2
  120. package/dist/plugins/oauth-proxy/index.d.cts +21 -41
  121. package/dist/plugins/oauth-proxy/index.d.mts +21 -41
  122. package/dist/plugins/oauth-proxy/index.d.ts +21 -41
  123. package/dist/plugins/oauth-proxy/index.mjs +2 -2
  124. package/dist/plugins/oidc-provider/index.cjs +2 -2
  125. package/dist/plugins/oidc-provider/index.d.cts +145 -158
  126. package/dist/plugins/oidc-provider/index.d.mts +145 -158
  127. package/dist/plugins/oidc-provider/index.d.ts +145 -158
  128. package/dist/plugins/oidc-provider/index.mjs +2 -2
  129. package/dist/plugins/one-tap/index.cjs +2 -2
  130. package/dist/plugins/one-tap/index.d.cts +20 -42
  131. package/dist/plugins/one-tap/index.d.mts +20 -42
  132. package/dist/plugins/one-tap/index.d.ts +20 -42
  133. package/dist/plugins/one-tap/index.mjs +2 -2
  134. package/dist/plugins/open-api/index.cjs +4 -2
  135. package/dist/plugins/open-api/index.d.cts +41 -20
  136. package/dist/plugins/open-api/index.d.mts +41 -20
  137. package/dist/plugins/open-api/index.d.ts +41 -20
  138. package/dist/plugins/open-api/index.mjs +4 -2
  139. package/dist/plugins/organization/index.cjs +3 -3
  140. package/dist/plugins/organization/index.d.cts +1374 -2916
  141. package/dist/plugins/organization/index.d.mts +1374 -2916
  142. package/dist/plugins/organization/index.d.ts +1374 -2916
  143. package/dist/plugins/organization/index.mjs +3 -3
  144. package/dist/plugins/passkey/index.cjs +2 -2
  145. package/dist/plugins/passkey/index.d.cts +146 -464
  146. package/dist/plugins/passkey/index.d.mts +146 -464
  147. package/dist/plugins/passkey/index.d.ts +146 -464
  148. package/dist/plugins/passkey/index.mjs +2 -2
  149. package/dist/plugins/phone-number/index.cjs +2 -2
  150. package/dist/plugins/phone-number/index.d.cts +103 -178
  151. package/dist/plugins/phone-number/index.d.mts +103 -178
  152. package/dist/plugins/phone-number/index.d.ts +103 -178
  153. package/dist/plugins/phone-number/index.mjs +2 -2
  154. package/dist/plugins/sso/index.cjs +3 -3
  155. package/dist/plugins/sso/index.d.cts +63 -206
  156. package/dist/plugins/sso/index.d.mts +63 -206
  157. package/dist/plugins/sso/index.d.ts +63 -206
  158. package/dist/plugins/sso/index.mjs +3 -3
  159. package/dist/plugins/two-factor/index.cjs +4 -4
  160. package/dist/plugins/two-factor/index.d.cts +221 -725
  161. package/dist/plugins/two-factor/index.d.mts +221 -725
  162. package/dist/plugins/two-factor/index.d.ts +221 -725
  163. package/dist/plugins/two-factor/index.mjs +4 -4
  164. package/dist/plugins/username/index.cjs +4 -4
  165. package/dist/plugins/username/index.d.cts +21 -44
  166. package/dist/plugins/username/index.d.mts +21 -44
  167. package/dist/plugins/username/index.d.ts +21 -44
  168. package/dist/plugins/username/index.mjs +4 -4
  169. package/dist/shared/{better-auth.-X_5SIE9.d.ts → better-auth.2p1C52nv.d.ts} +3 -3
  170. package/dist/shared/{better-auth.BsbUy_em.d.cts → better-auth.BArzzn5a.d.cts} +5354 -7954
  171. package/dist/shared/{better-auth.CjhKonVM.d.mts → better-auth.BDKSU3Dg.d.mts} +146 -205
  172. package/dist/shared/{better-auth.Dy3T8VFf.cjs → better-auth.BDYXUcLv.cjs} +1 -1
  173. package/dist/shared/{better-auth.BLFZHn6S.d.cts → better-auth.C5A8Vzv0.d.cts} +146 -205
  174. package/dist/shared/{better-auth.CY_Hrfhe.mjs → better-auth.CFzfx-2c.mjs} +1 -1
  175. package/dist/shared/{better-auth.D5DEHFvt.cjs → better-auth.CN1HkXUY.cjs} +1 -1
  176. package/dist/shared/{better-auth.CXagCPAv.cjs → better-auth.CPKJJalM.cjs} +4 -4
  177. package/dist/shared/{better-auth.Bu8n0vlp.mjs → better-auth.ClTSOgiD.mjs} +1 -1
  178. package/dist/shared/{better-auth.BzKq70UC.cjs → better-auth.Cm29ZKNJ.cjs} +5 -9
  179. package/dist/shared/{better-auth.BSbTjuSH.mjs → better-auth.CmHTEIYA.mjs} +4 -4
  180. package/dist/shared/{better-auth.i71gRg2g.d.ts → better-auth.CouMuYtz.d.ts} +5354 -7954
  181. package/dist/shared/{better-auth.ulRwlmfz.d.ts → better-auth.CvCI1gIa.d.ts} +146 -205
  182. package/dist/shared/{better-auth.CX0ifPU-.mjs → better-auth.D4jH-sJA.mjs} +1 -1
  183. package/dist/shared/{better-auth.B5Z63CQV.d.mts → better-auth.DCCen_rd.d.mts} +5354 -7954
  184. package/dist/shared/{better-auth.DjMtlb7e.mjs → better-auth.DCVeP5-W.mjs} +5 -9
  185. package/dist/shared/{better-auth.DkJ_Tcxu.d.cts → better-auth.Dy54W_9o.d.cts} +3 -3
  186. package/dist/shared/{better-auth.BGAbPcLi.d.mts → better-auth.YLWLGLEW.d.mts} +3 -3
  187. package/dist/shared/{better-auth.USxghgYQ.cjs → better-auth.m575EIBC.cjs} +1 -1
  188. package/dist/social-providers/index.cjs +1 -1
  189. package/dist/social-providers/index.mjs +1 -1
  190. package/dist/types/index.d.cts +2 -2
  191. package/dist/types/index.d.mts +2 -2
  192. package/dist/types/index.d.ts +2 -2
  193. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
- export { a as admin } from '../../shared/better-auth.BSbTjuSH.mjs';
1
+ export { a as admin } from '../../shared/better-auth.CmHTEIYA.mjs';
2
2
  import 'zod';
3
3
  import 'better-call';
4
- import '../../shared/better-auth.CX0ifPU-.mjs';
4
+ import '../../shared/better-auth.D4jH-sJA.mjs';
5
5
  import '../../cookies/index.mjs';
6
6
  import '../../shared/better-auth.DdzSJf-n.mjs';
7
7
  import '../../shared/better-auth.CW6D9eSx.mjs';
@@ -13,7 +13,7 @@ import '../../shared/better-auth.VTXNLFMT.mjs';
13
13
  import '../../social-providers/index.mjs';
14
14
  import '@better-fetch/fetch';
15
15
  import 'jose';
16
- import '../../shared/better-auth.DjMtlb7e.mjs';
16
+ import '../../shared/better-auth.DCVeP5-W.mjs';
17
17
  import '@better-auth/utils/hash';
18
18
  import '@noble/ciphers/chacha';
19
19
  import '@noble/ciphers/utils';
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  const betterCall = require('better-call');
4
- const refreshToken = require('../../shared/better-auth.Dy3T8VFf.cjs');
4
+ const refreshToken = require('../../shared/better-auth.BDYXUcLv.cjs');
5
5
  require('zod');
6
6
  const cookies_index = require('../../cookies/index.cjs');
7
7
  const schema$1 = require('../../shared/better-auth.C5H9XEzZ.cjs');
@@ -12,7 +12,7 @@ const url = require('../../shared/better-auth.C-R0J0n1.cjs');
12
12
  require('../../social-providers/index.cjs');
13
13
  require('@better-fetch/fetch');
14
14
  require('jose');
15
- require('../../shared/better-auth.BzKq70UC.cjs');
15
+ require('../../shared/better-auth.Cm29ZKNJ.cjs');
16
16
  require('../../shared/better-auth.C1hdVENX.cjs');
17
17
  require('@better-auth/utils/hash');
18
18
  require('@better-auth/utils/base64');
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.BsbUy_em.cjs';
2
+ import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.BArzzn5a.cjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.cjs';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.DpnaS1Ry.cjs';
@@ -54,40 +54,27 @@ declare const anonymous: (options?: AnonymousOptions) => {
54
54
  id: "anonymous";
55
55
  endpoints: {
56
56
  signInAnonymous: {
57
- <C extends [(better_call.InputContext<"/sign-in/anonymous", {
58
- method: "POST";
59
- metadata: {
60
- openapi: {
61
- description: string;
62
- responses: {
63
- 200: {
64
- description: string;
65
- content: {
66
- "application/json": {
67
- schema: {
68
- type: "object";
69
- properties: {
70
- user: {
71
- $ref: string;
72
- };
73
- session: {
74
- $ref: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- };
81
- };
82
- };
83
- };
57
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
58
+ body?: undefined;
84
59
  } & {
85
- use: any[];
86
- }> | undefined)?]>(...inputCtx: C): Promise<C extends [{
87
- asResponse: true;
88
- }] ? Response : C extends [{
89
- returnHeaders: true;
90
- }] ? {
60
+ method?: "POST" | undefined;
61
+ } & {
62
+ query?: Record<string, any> | undefined;
63
+ } & {
64
+ params?: Record<string, any>;
65
+ } & {
66
+ request?: Request;
67
+ } & {
68
+ headers?: HeadersInit;
69
+ } & {
70
+ asResponse?: boolean;
71
+ returnHeaders?: boolean;
72
+ use?: better_call.Middleware[];
73
+ path?: string;
74
+ } & {
75
+ asResponse?: AsResponse | undefined;
76
+ returnHeaders?: ReturnHeaders | undefined;
77
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
91
78
  headers: Headers;
92
79
  response: {
93
80
  token: string;
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.B5Z63CQV.mjs';
2
+ import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.DCCen_rd.mjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.mjs';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.-kZ-JqcP.mjs';
@@ -54,40 +54,27 @@ declare const anonymous: (options?: AnonymousOptions) => {
54
54
  id: "anonymous";
55
55
  endpoints: {
56
56
  signInAnonymous: {
57
- <C extends [(better_call.InputContext<"/sign-in/anonymous", {
58
- method: "POST";
59
- metadata: {
60
- openapi: {
61
- description: string;
62
- responses: {
63
- 200: {
64
- description: string;
65
- content: {
66
- "application/json": {
67
- schema: {
68
- type: "object";
69
- properties: {
70
- user: {
71
- $ref: string;
72
- };
73
- session: {
74
- $ref: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- };
81
- };
82
- };
83
- };
57
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
58
+ body?: undefined;
84
59
  } & {
85
- use: any[];
86
- }> | undefined)?]>(...inputCtx: C): Promise<C extends [{
87
- asResponse: true;
88
- }] ? Response : C extends [{
89
- returnHeaders: true;
90
- }] ? {
60
+ method?: "POST" | undefined;
61
+ } & {
62
+ query?: Record<string, any> | undefined;
63
+ } & {
64
+ params?: Record<string, any>;
65
+ } & {
66
+ request?: Request;
67
+ } & {
68
+ headers?: HeadersInit;
69
+ } & {
70
+ asResponse?: boolean;
71
+ returnHeaders?: boolean;
72
+ use?: better_call.Middleware[];
73
+ path?: string;
74
+ } & {
75
+ asResponse?: AsResponse | undefined;
76
+ returnHeaders?: ReturnHeaders | undefined;
77
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
91
78
  headers: Headers;
92
79
  response: {
93
80
  token: string;
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.i71gRg2g.js';
2
+ import { U as User, S as Session, I as InferOptionSchema, H as HookEndpointContext } from '../../shared/better-auth.CouMuYtz.js';
3
3
  import '../../shared/better-auth.Bi8FQwDD.js';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.Cr5ixZZK.js';
@@ -54,40 +54,27 @@ declare const anonymous: (options?: AnonymousOptions) => {
54
54
  id: "anonymous";
55
55
  endpoints: {
56
56
  signInAnonymous: {
57
- <C extends [(better_call.InputContext<"/sign-in/anonymous", {
58
- method: "POST";
59
- metadata: {
60
- openapi: {
61
- description: string;
62
- responses: {
63
- 200: {
64
- description: string;
65
- content: {
66
- "application/json": {
67
- schema: {
68
- type: "object";
69
- properties: {
70
- user: {
71
- $ref: string;
72
- };
73
- session: {
74
- $ref: string;
75
- };
76
- };
77
- };
78
- };
79
- };
80
- };
81
- };
82
- };
83
- };
57
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0?: ({
58
+ body?: undefined;
84
59
  } & {
85
- use: any[];
86
- }> | undefined)?]>(...inputCtx: C): Promise<C extends [{
87
- asResponse: true;
88
- }] ? Response : C extends [{
89
- returnHeaders: true;
90
- }] ? {
60
+ method?: "POST" | undefined;
61
+ } & {
62
+ query?: Record<string, any> | undefined;
63
+ } & {
64
+ params?: Record<string, any>;
65
+ } & {
66
+ request?: Request;
67
+ } & {
68
+ headers?: HeadersInit;
69
+ } & {
70
+ asResponse?: boolean;
71
+ returnHeaders?: boolean;
72
+ use?: better_call.Middleware[];
73
+ path?: string;
74
+ } & {
75
+ asResponse?: AsResponse | undefined;
76
+ returnHeaders?: ReturnHeaders | undefined;
77
+ }) | undefined): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
91
78
  headers: Headers;
92
79
  response: {
93
80
  token: string;
@@ -1,5 +1,5 @@
1
1
  import { APIError } from 'better-call';
2
- import { c as createAuthMiddleware, a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.CX0ifPU-.mjs';
2
+ import { c as createAuthMiddleware, a as createAuthEndpoint, g as getSessionFromCtx } from '../../shared/better-auth.D4jH-sJA.mjs';
3
3
  import 'zod';
4
4
  import { parseSetCookieHeader, setSessionCookie } from '../../cookies/index.mjs';
5
5
  import { m as mergeSchema } from '../../shared/better-auth.CepcSj5H.mjs';
@@ -10,7 +10,7 @@ import { g as getOrigin } from '../../shared/better-auth.VTXNLFMT.mjs';
10
10
  import '../../social-providers/index.mjs';
11
11
  import '@better-fetch/fetch';
12
12
  import 'jose';
13
- import '../../shared/better-auth.DjMtlb7e.mjs';
13
+ import '../../shared/better-auth.DCVeP5-W.mjs';
14
14
  import '../../shared/better-auth.CW6D9eSx.mjs';
15
15
  import '@better-auth/utils/hash';
16
16
  import '@better-auth/utils/base64';
@@ -5,7 +5,7 @@ require('../../shared/better-auth.DiSjtgs9.cjs');
5
5
  require('@better-auth/utils/base64');
6
6
  const hmac = require('@better-auth/utils/hmac');
7
7
  const cookies_index = require('../../cookies/index.cjs');
8
- const refreshToken = require('../../shared/better-auth.Dy3T8VFf.cjs');
8
+ const refreshToken = require('../../shared/better-auth.BDYXUcLv.cjs');
9
9
  require('zod');
10
10
  require('../../shared/better-auth.C5H9XEzZ.cjs');
11
11
  require('../../shared/better-auth.GpOOav9x.cjs');
@@ -17,7 +17,7 @@ require('../../shared/better-auth.C-R0J0n1.cjs');
17
17
  require('../../social-providers/index.cjs');
18
18
  require('@better-fetch/fetch');
19
19
  require('jose');
20
- require('../../shared/better-auth.BzKq70UC.cjs');
20
+ require('../../shared/better-auth.Cm29ZKNJ.cjs');
21
21
  require('@better-auth/utils/hash');
22
22
  require('@noble/ciphers/chacha');
23
23
  require('@noble/ciphers/utils');
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { H as HookEndpointContext } from '../../shared/better-auth.BsbUy_em.cjs';
2
+ import { H as HookEndpointContext } from '../../shared/better-auth.BArzzn5a.cjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.cjs';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.DpnaS1Ry.cjs';
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { H as HookEndpointContext } from '../../shared/better-auth.B5Z63CQV.mjs';
2
+ import { H as HookEndpointContext } from '../../shared/better-auth.DCCen_rd.mjs';
3
3
  import '../../shared/better-auth.Bi8FQwDD.mjs';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.-kZ-JqcP.mjs';
@@ -1,5 +1,5 @@
1
1
  import * as better_call from 'better-call';
2
- import { H as HookEndpointContext } from '../../shared/better-auth.i71gRg2g.js';
2
+ import { H as HookEndpointContext } from '../../shared/better-auth.CouMuYtz.js';
3
3
  import '../../shared/better-auth.Bi8FQwDD.js';
4
4
  import 'zod';
5
5
  import '../../shared/better-auth.Cr5ixZZK.js';
@@ -3,7 +3,7 @@ import '../../shared/better-auth.8zoxzg-F.mjs';
3
3
  import '@better-auth/utils/base64';
4
4
  import { createHMAC } from '@better-auth/utils/hmac';
5
5
  import { parseSetCookieHeader } from '../../cookies/index.mjs';
6
- import { c as createAuthMiddleware } from '../../shared/better-auth.CX0ifPU-.mjs';
6
+ import { c as createAuthMiddleware } from '../../shared/better-auth.D4jH-sJA.mjs';
7
7
  import 'zod';
8
8
  import '../../shared/better-auth.CepcSj5H.mjs';
9
9
  import '../../shared/better-auth.DH3YjMQH.mjs';
@@ -15,7 +15,7 @@ import '../../shared/better-auth.VTXNLFMT.mjs';
15
15
  import '../../social-providers/index.mjs';
16
16
  import '@better-fetch/fetch';
17
17
  import 'jose';
18
- import '../../shared/better-auth.DjMtlb7e.mjs';
18
+ import '../../shared/better-auth.DCVeP5-W.mjs';
19
19
  import '@better-auth/utils/hash';
20
20
  import '@noble/ciphers/chacha';
21
21
  import '@noble/ciphers/utils';
@@ -2,7 +2,7 @@
2
2
 
3
3
  const zod = require('zod');
4
4
  require('better-call');
5
- const refreshToken = require('../../shared/better-auth.Dy3T8VFf.cjs');
5
+ const refreshToken = require('../../shared/better-auth.BDYXUcLv.cjs');
6
6
  require('../../shared/better-auth.DiSjtgs9.cjs');
7
7
  require('@better-auth/utils/base64');
8
8
  require('@better-auth/utils/hmac');
@@ -17,7 +17,7 @@ require('../../shared/better-auth.C-R0J0n1.cjs');
17
17
  require('../../social-providers/index.cjs');
18
18
  require('@better-fetch/fetch');
19
19
  require('jose');
20
- require('../../shared/better-auth.BzKq70UC.cjs');
20
+ require('../../shared/better-auth.Cm29ZKNJ.cjs');
21
21
  require('@better-auth/utils/hash');
22
22
  require('@noble/ciphers/chacha');
23
23
  require('@noble/ciphers/utils');
@@ -70,7 +70,7 @@ const customSession = (fn, options) => {
70
70
  }).catch((e) => {
71
71
  return null;
72
72
  });
73
- if (!session) {
73
+ if (!session?.response) {
74
74
  return ctx.json(null);
75
75
  }
76
76
  const fnResult = await fn(session.response);
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import { z } from 'zod';
3
- import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.BsbUy_em.cjs';
3
+ import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.BArzzn5a.cjs';
4
4
  import '../../shared/better-auth.Bi8FQwDD.cjs';
5
5
  import '../../shared/better-auth.DpnaS1Ry.cjs';
6
6
  import 'jose';
@@ -14,33 +14,30 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
14
14
  id: "custom-session";
15
15
  endpoints: {
16
16
  getSession: {
17
- <C extends [better_call.InputContext<"/get-session", {
18
- method: "GET";
19
- metadata: {
20
- CUSTOM_SESSION: boolean;
21
- };
22
- query: z.ZodOptional<z.ZodObject<{
23
- /**
24
- * If cookie cache is enabled, it will disable the cache
25
- * and fetch the session from the database
26
- */
27
- disableCookieCache: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodString, boolean, string>]>>;
28
- disableRefresh: z.ZodOptional<z.ZodBoolean>;
29
- }, "strip", z.ZodTypeAny, {
30
- disableCookieCache?: boolean | undefined;
31
- disableRefresh?: boolean | undefined;
32
- }, {
17
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
18
+ body?: undefined;
19
+ } & {
20
+ method?: "GET" | undefined;
21
+ } & {
22
+ query?: {
33
23
  disableCookieCache?: string | boolean | undefined;
34
24
  disableRefresh?: boolean | undefined;
35
- }>>;
36
- requireHeaders: true;
25
+ } | undefined;
37
26
  } & {
38
- use: any[];
39
- }>]>(...inputCtx: C): Promise<C extends [{
40
- asResponse: true;
41
- }] ? Response : C extends [{
42
- returnHeaders: true;
43
- }] ? {
27
+ params?: Record<string, any>;
28
+ } & {
29
+ request?: Request;
30
+ } & {
31
+ headers: HeadersInit;
32
+ } & {
33
+ asResponse?: boolean;
34
+ returnHeaders?: boolean;
35
+ use?: better_call.Middleware[];
36
+ path?: string;
37
+ } & {
38
+ asResponse?: AsResponse | undefined;
39
+ returnHeaders?: ReturnHeaders | undefined;
40
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
44
41
  headers: Headers;
45
42
  response: Returns | null;
46
43
  } : Returns | null>;
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import { z } from 'zod';
3
- import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.B5Z63CQV.mjs';
3
+ import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.DCCen_rd.mjs';
4
4
  import '../../shared/better-auth.Bi8FQwDD.mjs';
5
5
  import '../../shared/better-auth.-kZ-JqcP.mjs';
6
6
  import 'jose';
@@ -14,33 +14,30 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
14
14
  id: "custom-session";
15
15
  endpoints: {
16
16
  getSession: {
17
- <C extends [better_call.InputContext<"/get-session", {
18
- method: "GET";
19
- metadata: {
20
- CUSTOM_SESSION: boolean;
21
- };
22
- query: z.ZodOptional<z.ZodObject<{
23
- /**
24
- * If cookie cache is enabled, it will disable the cache
25
- * and fetch the session from the database
26
- */
27
- disableCookieCache: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodString, boolean, string>]>>;
28
- disableRefresh: z.ZodOptional<z.ZodBoolean>;
29
- }, "strip", z.ZodTypeAny, {
30
- disableCookieCache?: boolean | undefined;
31
- disableRefresh?: boolean | undefined;
32
- }, {
17
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
18
+ body?: undefined;
19
+ } & {
20
+ method?: "GET" | undefined;
21
+ } & {
22
+ query?: {
33
23
  disableCookieCache?: string | boolean | undefined;
34
24
  disableRefresh?: boolean | undefined;
35
- }>>;
36
- requireHeaders: true;
25
+ } | undefined;
37
26
  } & {
38
- use: any[];
39
- }>]>(...inputCtx: C): Promise<C extends [{
40
- asResponse: true;
41
- }] ? Response : C extends [{
42
- returnHeaders: true;
43
- }] ? {
27
+ params?: Record<string, any>;
28
+ } & {
29
+ request?: Request;
30
+ } & {
31
+ headers: HeadersInit;
32
+ } & {
33
+ asResponse?: boolean;
34
+ returnHeaders?: boolean;
35
+ use?: better_call.Middleware[];
36
+ path?: string;
37
+ } & {
38
+ asResponse?: AsResponse | undefined;
39
+ returnHeaders?: ReturnHeaders | undefined;
40
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
44
41
  headers: Headers;
45
42
  response: Returns | null;
46
43
  } : Returns | null>;
@@ -1,6 +1,6 @@
1
1
  import * as better_call from 'better-call';
2
2
  import { z } from 'zod';
3
- import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.i71gRg2g.js';
3
+ import { f as BetterAuthOptions, j as InferUser, k as InferSession } from '../../shared/better-auth.CouMuYtz.js';
4
4
  import '../../shared/better-auth.Bi8FQwDD.js';
5
5
  import '../../shared/better-auth.Cr5ixZZK.js';
6
6
  import 'jose';
@@ -14,33 +14,30 @@ declare const customSession: <Returns extends Record<string, any>, O extends Bet
14
14
  id: "custom-session";
15
15
  endpoints: {
16
16
  getSession: {
17
- <C extends [better_call.InputContext<"/get-session", {
18
- method: "GET";
19
- metadata: {
20
- CUSTOM_SESSION: boolean;
21
- };
22
- query: z.ZodOptional<z.ZodObject<{
23
- /**
24
- * If cookie cache is enabled, it will disable the cache
25
- * and fetch the session from the database
26
- */
27
- disableCookieCache: z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodEffects<z.ZodString, boolean, string>]>>;
28
- disableRefresh: z.ZodOptional<z.ZodBoolean>;
29
- }, "strip", z.ZodTypeAny, {
30
- disableCookieCache?: boolean | undefined;
31
- disableRefresh?: boolean | undefined;
32
- }, {
17
+ <AsResponse extends boolean = false, ReturnHeaders extends boolean = false>(inputCtx_0: {
18
+ body?: undefined;
19
+ } & {
20
+ method?: "GET" | undefined;
21
+ } & {
22
+ query?: {
33
23
  disableCookieCache?: string | boolean | undefined;
34
24
  disableRefresh?: boolean | undefined;
35
- }>>;
36
- requireHeaders: true;
25
+ } | undefined;
37
26
  } & {
38
- use: any[];
39
- }>]>(...inputCtx: C): Promise<C extends [{
40
- asResponse: true;
41
- }] ? Response : C extends [{
42
- returnHeaders: true;
43
- }] ? {
27
+ params?: Record<string, any>;
28
+ } & {
29
+ request?: Request;
30
+ } & {
31
+ headers: HeadersInit;
32
+ } & {
33
+ asResponse?: boolean;
34
+ returnHeaders?: boolean;
35
+ use?: better_call.Middleware[];
36
+ path?: string;
37
+ } & {
38
+ asResponse?: AsResponse | undefined;
39
+ returnHeaders?: ReturnHeaders | undefined;
40
+ }): Promise<[AsResponse] extends [true] ? Response : [ReturnHeaders] extends [true] ? {
44
41
  headers: Headers;
45
42
  response: Returns | null;
46
43
  } : Returns | null>;
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import 'better-call';
3
- import { a as createAuthEndpoint, b as getSession } from '../../shared/better-auth.CX0ifPU-.mjs';
3
+ import { a as createAuthEndpoint, b as getSession } from '../../shared/better-auth.D4jH-sJA.mjs';
4
4
  import '../../shared/better-auth.8zoxzg-F.mjs';
5
5
  import '@better-auth/utils/base64';
6
6
  import '@better-auth/utils/hmac';
@@ -15,7 +15,7 @@ import '../../shared/better-auth.VTXNLFMT.mjs';
15
15
  import '../../social-providers/index.mjs';
16
16
  import '@better-fetch/fetch';
17
17
  import 'jose';
18
- import '../../shared/better-auth.DjMtlb7e.mjs';
18
+ import '../../shared/better-auth.DCVeP5-W.mjs';
19
19
  import '@better-auth/utils/hash';
20
20
  import '@noble/ciphers/chacha';
21
21
  import '@noble/ciphers/utils';
@@ -68,7 +68,7 @@ const customSession = (fn, options) => {
68
68
  }).catch((e) => {
69
69
  return null;
70
70
  });
71
- if (!session) {
71
+ if (!session?.response) {
72
72
  return ctx.json(null);
73
73
  }
74
74
  const fnResult = await fn(session.response);
@@ -2,7 +2,7 @@
2
2
 
3
3
  const zod = require('zod');
4
4
  const betterCall = require('better-call');
5
- const refreshToken = require('../../shared/better-auth.Dy3T8VFf.cjs');
5
+ const refreshToken = require('../../shared/better-auth.BDYXUcLv.cjs');
6
6
  const cookies_index = require('../../cookies/index.cjs');
7
7
  require('../../shared/better-auth.C5H9XEzZ.cjs');
8
8
  require('../../shared/better-auth.DiSjtgs9.cjs');
@@ -23,7 +23,7 @@ const date = require('../../shared/better-auth.C1hdVENX.cjs');
23
23
  const pluginHelper = require('../../shared/better-auth.DNqtHmvg.cjs');
24
24
  require('../../social-providers/index.cjs');
25
25
  require('@better-fetch/fetch');
26
- require('../../shared/better-auth.BzKq70UC.cjs');
26
+ require('../../shared/better-auth.Cm29ZKNJ.cjs');
27
27
  require('../../shared/better-auth.ANpbi45u.cjs');
28
28
  require('@better-auth/utils/random');
29
29
  require('../../shared/better-auth.QbbyHMYf.cjs');