@better-auth/electron 1.6.27 → 1.6.28

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.
@@ -1,9 +1,12 @@
1
+ import * as _$better_auth0 from "better-auth";
1
2
  import { ClientStore } from "better-auth";
2
3
  import * as z from "zod";
4
+ import * as _$_better_fetch_fetch0 from "@better-fetch/fetch";
3
5
  import { BetterFetch, BetterFetchError, CreateFetchOption } from "@better-fetch/fetch";
4
6
  import electron from "electron";
5
7
  import { Awaitable, BetterAuthClientOptions } from "@better-auth/core";
6
8
  import { User } from "@better-auth/core/db";
9
+
7
10
  //#region src/types/options.d.ts
8
11
  interface ElectronSharedOptions {
9
12
  /**
@@ -259,7 +262,13 @@ interface ElectronAuthenticateOptions {
259
262
  /**
260
263
  * Exchanges the authorization code for a session.
261
264
  */
262
- declare function authenticate({ $fetch, options, token, getWindow, fetchOptions }: ElectronAuthenticateOptions & {
265
+ declare function authenticate({
266
+ $fetch,
267
+ options,
268
+ token,
269
+ getWindow,
270
+ fetchOptions
271
+ }: ElectronAuthenticateOptions & {
263
272
  $fetch: BetterFetch;
264
273
  options: ElectronClientOptions;
265
274
  getWindow: () => Electron.BrowserWindow | null | undefined;
@@ -288,7 +297,13 @@ type SetupMainConfig = {
288
297
  /**
289
298
  * Handles the deep link URL for authentication.
290
299
  */
291
- declare function handleDeepLink({ $fetch, options, url, getWindow, clientOptions }: {
300
+ declare function handleDeepLink({
301
+ $fetch,
302
+ options,
303
+ url,
304
+ getWindow,
305
+ clientOptions
306
+ }: {
292
307
  $fetch: BetterFetch;
293
308
  options: ElectronClientOptions;
294
309
  url: string;
@@ -316,17 +331,17 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
316
331
  referrerPolicy?: ReferrerPolicy | undefined;
317
332
  signal?: (AbortSignal | null) | undefined;
318
333
  window?: null | undefined;
319
- onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
320
- onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
321
- onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
322
- onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
323
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
334
+ onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
335
+ onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
336
+ onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
337
+ onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
338
+ onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
324
339
  hookOptions?: {
325
340
  cloneResponse?: boolean;
326
341
  } | undefined;
327
342
  timeout?: number | undefined;
328
- customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
329
- plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
343
+ customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
344
+ plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
330
345
  baseURL?: string | undefined;
331
346
  throw?: boolean | undefined;
332
347
  auth?: ({
@@ -352,10 +367,10 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
352
367
  params?: any;
353
368
  duplex?: "full" | "half" | undefined;
354
369
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
355
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
370
+ retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
356
371
  retryAttempt?: number | undefined;
357
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
358
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
372
+ output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
373
+ errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
359
374
  disableValidation?: boolean | undefined;
360
375
  } & Record<string, any>) | undefined): Promise<{
361
376
  url: string;
@@ -372,17 +387,17 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
372
387
  referrerPolicy?: ReferrerPolicy | undefined;
373
388
  signal?: (AbortSignal | null) | undefined;
374
389
  window?: null | undefined;
375
- onRequest?: (<T extends Record<string, any>>(context: import("@better-fetch/fetch").RequestContext<T>) => Promise<import("@better-fetch/fetch").RequestContext | void> | import("@better-fetch/fetch").RequestContext | void) | undefined;
376
- onResponse?: ((context: import("@better-fetch/fetch").ResponseContext) => Promise<Response | void | import("@better-fetch/fetch").ResponseContext> | Response | import("@better-fetch/fetch").ResponseContext | void) | undefined;
377
- onSuccess?: ((context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void> | void) | undefined;
378
- onError?: ((context: import("@better-fetch/fetch").ErrorContext) => Promise<void> | void) | undefined;
379
- onRetry?: ((response: import("@better-fetch/fetch").ResponseContext) => Promise<void> | void) | undefined;
390
+ onRequest?: (<T extends Record<string, any>>(context: _$_better_fetch_fetch0.RequestContext<T>) => Promise<_$_better_fetch_fetch0.RequestContext | void> | _$_better_fetch_fetch0.RequestContext | void) | undefined;
391
+ onResponse?: ((context: _$_better_fetch_fetch0.ResponseContext) => Promise<Response | void | _$_better_fetch_fetch0.ResponseContext> | Response | _$_better_fetch_fetch0.ResponseContext | void) | undefined;
392
+ onSuccess?: ((context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void> | void) | undefined;
393
+ onError?: ((context: _$_better_fetch_fetch0.ErrorContext) => Promise<void> | void) | undefined;
394
+ onRetry?: ((response: _$_better_fetch_fetch0.ResponseContext) => Promise<void> | void) | undefined;
380
395
  hookOptions?: {
381
396
  cloneResponse?: boolean;
382
397
  } | undefined;
383
398
  timeout?: number | undefined;
384
- customFetchImpl?: import("@better-fetch/fetch").FetchEsque | undefined;
385
- plugins?: import("@better-fetch/fetch").BetterFetchPlugin[] | undefined;
399
+ customFetchImpl?: _$_better_fetch_fetch0.FetchEsque | undefined;
400
+ plugins?: _$_better_fetch_fetch0.BetterFetchPlugin[] | undefined;
386
401
  baseURL?: string | undefined;
387
402
  throw?: boolean | undefined;
388
403
  auth?: ({
@@ -408,19 +423,19 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
408
423
  params?: any;
409
424
  duplex?: "full" | "half" | undefined;
410
425
  jsonParser?: ((text: string) => Promise<any> | any) | undefined;
411
- retry?: import("@better-fetch/fetch").RetryOptions | undefined;
426
+ retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
412
427
  retryAttempt?: number | undefined;
413
- output?: (import("@better-fetch/fetch").StandardSchemaV1 | typeof Blob | typeof File) | undefined;
414
- errorSchema?: import("@better-fetch/fetch").StandardSchemaV1 | undefined;
428
+ output?: (_$_better_fetch_fetch0.StandardSchemaV1 | typeof Blob | typeof File) | undefined;
429
+ errorSchema?: _$_better_fetch_fetch0.StandardSchemaV1 | undefined;
415
430
  disableValidation?: boolean | undefined;
416
431
  } & Record<string, any>;
417
432
  }>;
418
433
  hooks: {
419
- onSuccess: (context: import("@better-fetch/fetch").SuccessContext<any>) => Promise<void>;
420
- onError: (context: import("@better-fetch/fetch").ErrorContext) => Promise<void>;
434
+ onSuccess: (context: _$_better_fetch_fetch0.SuccessContext<any>) => Promise<void>;
435
+ onError: (context: _$_better_fetch_fetch0.ErrorContext) => Promise<void>;
421
436
  };
422
437
  }[];
423
- getActions: ($fetch: import("@better-fetch/fetch").BetterFetch, $store: ClientStore, clientOptions: import("better-auth").BetterAuthClientOptions | undefined) => {
438
+ getActions: ($fetch: _$_better_fetch_fetch0.BetterFetch, $store: ClientStore, clientOptions: _$better_auth0.BetterAuthClientOptions | undefined) => {
424
439
  /**
425
440
  * Gets the stored cookie.
426
441
  *
@@ -458,7 +473,7 @@ declare const electronClient: <O extends ElectronClientOptions>(options: O) => {
458
473
  } | {
459
474
  data: {
460
475
  token: string;
461
- user: import("better-auth").User & Record<string, any>;
476
+ user: _$better_auth0.User & Record<string, any>;
462
477
  };
463
478
  error: null;
464
479
  }>;
package/dist/client.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as setupRenderer, a as authenticate, c as ElectronClientOptions, d as Storage, f as FetchUserImageResult, g as SetupRendererConfig, h as ExposedBridges, i as ElectronRequestAuthOptions, l as ElectronProxyClientOptions, m as normalizeUserOutput, n as handleDeepLink, o as kElectron, p as fetchUserImage, r as ElectronAuthenticateOptions, s as requestAuth, t as electronClient, u as ElectronSharedClientOptions, y as ElectronSharedOptions } from "./client-Dfn6XsLf.mjs";
2
- export { type ElectronAuthenticateOptions, type ElectronClientOptions, type ElectronProxyClientOptions, type ElectronRequestAuthOptions, type ElectronSharedClientOptions, type ElectronSharedOptions, type ExposedBridges, type FetchUserImageResult, type SetupRendererConfig, type Storage, type authenticate, electronClient, type fetchUserImage, handleDeepLink, type kElectron, normalizeUserOutput, type requestAuth, type setupRenderer };
1
+ import { _ as setupRenderer, a as authenticate, c as ElectronClientOptions, d as Storage, f as FetchUserImageResult, g as SetupRendererConfig, h as ExposedBridges, i as ElectronRequestAuthOptions, l as ElectronProxyClientOptions, m as normalizeUserOutput, n as handleDeepLink, o as kElectron, p as fetchUserImage, r as ElectronAuthenticateOptions, s as requestAuth, t as electronClient, u as ElectronSharedClientOptions, y as ElectronSharedOptions } from "./client-D1E7e0Mq.mjs";
2
+ export { ElectronAuthenticateOptions, ElectronClientOptions, ElectronProxyClientOptions, ElectronRequestAuthOptions, ElectronSharedClientOptions, ElectronSharedOptions, ExposedBridges, FetchUserImageResult, SetupRendererConfig, Storage, authenticate, electronClient, fetchUserImage, handleDeepLink, kElectron, normalizeUserOutput, requestAuth, setupRenderer };
package/dist/client.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as PACKAGE_VERSION } from "./version-B4oCeoTU.mjs";
2
- import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-C5XBRvIU.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-6ZHwEASO.mjs";
2
+ import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-DxDKRT6e.mjs";
3
3
  import { BetterAuthError } from "@better-auth/core/error";
4
4
  import { base64, base64Url } from "@better-auth/utils/base64";
5
5
  import { APIError as APIError$1, getBaseURL, isDevelopment, isTest, safeJSONParse } from "better-auth";
@@ -578,7 +578,7 @@ const electronClient = (options) => {
578
578
  let store = null;
579
579
  const cookieName = `${opts.storagePrefix}.cookie`;
580
580
  const localCacheName = `${opts.storagePrefix}.local_cache`;
581
- const { getDecrypted, setEncrypted } = storageAdapter(opts.storage, /* @__PURE__ */ new Set([cookieName, localCacheName]));
581
+ const { getDecrypted, setEncrypted } = storageAdapter(opts.storage, new Set([cookieName, localCacheName]));
582
582
  const clearSessionCache = () => {
583
583
  setEncrypted(cookieName, "{}");
584
584
  store?.atoms.session?.set({
package/dist/index.d.mts CHANGED
@@ -1,6 +1,10 @@
1
- import { f as FetchUserImageResult, m as normalizeUserOutput, p as fetchUserImage, v as ElectronOptions, y as ElectronSharedOptions } from "./client-Dfn6XsLf.mjs";
1
+ import { f as FetchUserImageResult, m as normalizeUserOutput, p as fetchUserImage, v as ElectronOptions, y as ElectronSharedOptions } from "./client-D1E7e0Mq.mjs";
2
+ import * as _$better_auth0 from "better-auth";
2
3
  import * as z from "zod";
4
+ import * as _$_better_auth_core0 from "@better-auth/core";
3
5
  import { HookEndpointContext } from "@better-auth/core";
6
+ import * as _$better_call0 from "better-call";
7
+
4
8
  //#region src/index.d.ts
5
9
  declare module "@better-auth/core" {
6
10
  interface BetterAuthPluginRegistry<AuthOptions, Options> {
@@ -12,17 +16,17 @@ declare module "@better-auth/core" {
12
16
  declare const electron: (options?: ElectronOptions | undefined) => {
13
17
  id: "electron";
14
18
  version: string;
15
- onRequest(request: Request, _ctx: import("better-auth").AuthContext): Promise<{
19
+ onRequest(request: Request, _ctx: _$better_auth0.AuthContext): Promise<{
16
20
  request: Request;
17
21
  } | undefined>;
18
22
  hooks: {
19
23
  after: ({
20
24
  matcher: (ctx: HookEndpointContext) => boolean;
21
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<void>>;
25
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<void>>;
22
26
  } | {
23
27
  matcher: (ctx: HookEndpointContext) => boolean;
24
- handler: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<import("better-call").MiddlewareContext<import("better-call").MiddlewareOptions, import("better-auth").PluginContext<import("better-auth").BetterAuthOptions> & import("better-auth").InfoContext & {
25
- options: import("better-auth").BetterAuthOptions;
28
+ handler: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<_$better_call0.MiddlewareContext<_$better_call0.MiddlewareOptions, _$better_auth0.PluginContext<_$better_auth0.BetterAuthOptions> & _$better_auth0.InfoContext & {
29
+ options: _$better_auth0.BetterAuthOptions;
26
30
  trustedOrigins: string[];
27
31
  trustedProviders: string[];
28
32
  isTrustedOrigin: (url: string, settings?: {
@@ -95,20 +99,20 @@ declare const electron: (options?: ElectronOptions | undefined) => {
95
99
  image?: string | null | undefined;
96
100
  } & Record<string, any>;
97
101
  } | null) => void;
98
- socialProviders: import("better-auth").OAuthProvider[];
99
- authCookies: import("better-auth").BetterAuthCookies;
100
- logger: ReturnType<typeof import("better-auth").createLogger>;
102
+ socialProviders: _$better_auth0.OAuthProvider[];
103
+ authCookies: _$better_auth0.BetterAuthCookies;
104
+ logger: ReturnType<typeof _$better_auth0.createLogger>;
101
105
  rateLimit: {
102
106
  enabled: boolean;
103
107
  window: number;
104
108
  max: number;
105
109
  storage: "memory" | "database" | "secondary-storage";
106
- } & Omit<import("better-auth").BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
107
- adapter: import("better-auth").DBAdapter<import("better-auth").BetterAuthOptions>;
108
- internalAdapter: import("better-auth").InternalAdapter<import("better-auth").BetterAuthOptions>;
109
- createAuthCookie: (cookieName: string, overrideAttributes?: Partial<import("better-call").CookieOptions> | undefined) => import("better-auth").BetterAuthCookie;
110
+ } & Omit<_$better_auth0.BetterAuthRateLimitOptions, "enabled" | "window" | "max" | "storage">;
111
+ adapter: _$better_auth0.DBAdapter<_$better_auth0.BetterAuthOptions>;
112
+ internalAdapter: _$better_auth0.InternalAdapter<_$better_auth0.BetterAuthOptions>;
113
+ createAuthCookie: (cookieName: string, overrideAttributes?: Partial<_$better_call0.CookieOptions> | undefined) => _$better_auth0.BetterAuthCookie;
110
114
  secret: string;
111
- secretConfig: string | import("better-auth").SecretConfig;
115
+ secretConfig: string | _$better_auth0.SecretConfig;
112
116
  sessionConfig: {
113
117
  updateAge: number;
114
118
  expiresIn: number;
@@ -119,10 +123,10 @@ declare const electron: (options?: ElectronOptions | undefined) => {
119
123
  };
120
124
  };
121
125
  generateId: (options: {
122
- model: import("better-auth").ModelNames;
126
+ model: _$better_auth0.ModelNames;
123
127
  size?: number | undefined;
124
128
  }) => string | false;
125
- secondaryStorage: import("better-auth").SecondaryStorage | undefined;
129
+ secondaryStorage: _$better_auth0.SecondaryStorage | undefined;
126
130
  password: {
127
131
  hash: (password: string) => Promise<string>;
128
132
  verify: (data: {
@@ -133,9 +137,9 @@ declare const electron: (options?: ElectronOptions | undefined) => {
133
137
  minPasswordLength: number;
134
138
  maxPasswordLength: number;
135
139
  };
136
- checkPassword: (userId: string, ctx: import("@better-auth/core").GenericEndpointContext<import("better-auth").BetterAuthOptions>) => Promise<boolean>;
140
+ checkPassword: (userId: string, ctx: _$_better_auth_core0.GenericEndpointContext<_$better_auth0.BetterAuthOptions>) => Promise<boolean>;
137
141
  };
138
- tables: import("better-auth").BetterAuthDBSchema;
142
+ tables: _$better_auth0.BetterAuthDBSchema;
139
143
  runMigrations: () => Promise<void>;
140
144
  publishTelemetry: (event: {
141
145
  type: string;
@@ -145,7 +149,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
145
149
  skipOriginCheck: boolean | string[];
146
150
  skipCSRFCheck: boolean;
147
151
  runInBackground: (promise: Promise<unknown>) => void;
148
- runInBackgroundOrAwait: (promise: Promise<unknown> | void) => import("better-auth").Awaitable<unknown>;
152
+ runInBackgroundOrAwait: (promise: Promise<unknown> | void) => _$better_auth0.Awaitable<unknown>;
149
153
  } & {
150
154
  returned?: unknown | undefined;
151
155
  responseHeaders?: Headers | undefined;
@@ -155,7 +159,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
155
159
  })[];
156
160
  };
157
161
  endpoints: {
158
- electronToken: import("better-call").StrictEndpoint<"/electron/token", {
162
+ electronToken: _$better_call0.StrictEndpoint<"/electron/token", {
159
163
  method: "POST";
160
164
  body: z.ZodObject<{
161
165
  token: z.ZodString;
@@ -193,9 +197,9 @@ declare const electron: (options?: ElectronOptions | undefined) => {
193
197
  };
194
198
  }, {
195
199
  token: string;
196
- user: import("better-auth").User & Record<string, any>;
200
+ user: _$better_auth0.User & Record<string, any>;
197
201
  }>;
198
- electronInitOAuthProxy: import("better-call").StrictEndpoint<"/electron/init-oauth-proxy", {
202
+ electronInitOAuthProxy: _$better_call0.StrictEndpoint<"/electron/init-oauth-proxy", {
199
203
  method: "GET";
200
204
  query: z.ZodObject<{
201
205
  provider: z.ZodString;
@@ -242,10 +246,10 @@ declare const electron: (options?: ElectronOptions | undefined) => {
242
246
  }, {
243
247
  url: string | undefined;
244
248
  redirect: boolean;
245
- user?: import("better-auth").User & Record<string, any>;
249
+ user?: _$better_auth0.User & Record<string, any>;
246
250
  token?: string;
247
251
  } | undefined>;
248
- electronTransferUser: import("better-call").StrictEndpoint<"/electron/transfer-user", {
252
+ electronTransferUser: _$better_call0.StrictEndpoint<"/electron/transfer-user", {
249
253
  method: "POST";
250
254
  query: z.ZodObject<{
251
255
  client_id: z.ZodString;
@@ -256,7 +260,7 @@ declare const electron: (options?: ElectronOptions | undefined) => {
256
260
  body: z.ZodObject<{
257
261
  callbackURL: z.ZodOptional<z.ZodString>;
258
262
  }, z.core.$strip>;
259
- use: import("better-call").Middleware<import("better-call").MiddlewareOptions, (inputContext: import("better-call").MiddlewareInputContext<import("better-call").MiddlewareOptions>) => Promise<{
263
+ use: _$better_call0.Middleware<_$better_call0.MiddlewareOptions, (inputContext: _$better_call0.MiddlewareInputContext<_$better_call0.MiddlewareOptions>) => Promise<{
260
264
  session: {
261
265
  session: Record<string, any> & {
262
266
  id: string;
@@ -325,15 +329,15 @@ declare const electron: (options?: ElectronOptions | undefined) => {
325
329
  clientID: string;
326
330
  };
327
331
  $ERROR_CODES: {
328
- INVALID_TOKEN: import("better-auth").RawError<"INVALID_TOKEN">;
329
- INVALID_CLIENT_ID: import("better-auth").RawError<"INVALID_CLIENT_ID">;
330
- STATE_MISMATCH: import("better-auth").RawError<"STATE_MISMATCH">;
331
- MISSING_CODE_CHALLENGE: import("better-auth").RawError<"MISSING_CODE_CHALLENGE">;
332
- INVALID_CODE_VERIFIER: import("better-auth").RawError<"INVALID_CODE_VERIFIER">;
333
- MISSING_STATE: import("better-auth").RawError<"MISSING_STATE">;
334
- MISSING_PKCE: import("better-auth").RawError<"MISSING_PKCE">;
335
- INVALID_PKCE_METHOD: import("better-auth").RawError<"INVALID_PKCE_METHOD">;
332
+ INVALID_TOKEN: _$better_auth0.RawError<"INVALID_TOKEN">;
333
+ INVALID_CLIENT_ID: _$better_auth0.RawError<"INVALID_CLIENT_ID">;
334
+ STATE_MISMATCH: _$better_auth0.RawError<"STATE_MISMATCH">;
335
+ MISSING_CODE_CHALLENGE: _$better_auth0.RawError<"MISSING_CODE_CHALLENGE">;
336
+ INVALID_CODE_VERIFIER: _$better_auth0.RawError<"INVALID_CODE_VERIFIER">;
337
+ MISSING_STATE: _$better_auth0.RawError<"MISSING_STATE">;
338
+ MISSING_PKCE: _$better_auth0.RawError<"MISSING_PKCE">;
339
+ INVALID_PKCE_METHOD: _$better_auth0.RawError<"INVALID_PKCE_METHOD">;
336
340
  };
337
341
  };
338
342
  //#endregion
339
- export { type ElectronOptions, type ElectronSharedOptions, type FetchUserImageResult, electron, type fetchUserImage, type normalizeUserOutput };
343
+ export { ElectronOptions, ElectronSharedOptions, FetchUserImageResult, electron, fetchUserImage, normalizeUserOutput };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-B4oCeoTU.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-6ZHwEASO.mjs";
2
2
  import { createAuthMiddleware } from "@better-auth/core/api";
3
3
  import { APIError, BASE_ERROR_CODES } from "@better-auth/core/error";
4
4
  import { base64Url } from "@better-auth/utils/base64";
@@ -1,9 +1,7 @@
1
- import electron from "electron";
2
1
  import { Awaitable } from "@better-auth/core";
3
2
  import { User } from "@better-auth/core/db";
4
3
  import { BetterFetchError } from "@better-fetch/fetch";
5
4
  import * as z from "zod";
6
- import "better-auth";
7
5
  //#region src/types/options.d.ts
8
6
  interface ElectronSharedOptions {
9
7
  /**
package/dist/proxy.d.mts CHANGED
@@ -1,5 +1,6 @@
1
- import { l as ElectronProxyClientOptions } from "./client-Dfn6XsLf.mjs";
1
+ import { l as ElectronProxyClientOptions } from "./client-D1E7e0Mq.mjs";
2
2
  import { electron } from "./index.mjs";
3
+
3
4
  //#region src/proxy.d.ts
4
5
  declare const electronProxyClient: (options: ElectronProxyClientOptions) => {
5
6
  id: "electron-proxy";
package/dist/proxy.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { t as PACKAGE_VERSION } from "./version-B4oCeoTU.mjs";
2
- import { r as parseProtocolScheme } from "./utils-C5XBRvIU.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-6ZHwEASO.mjs";
2
+ import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
3
3
  import { parseCookies } from "better-auth/cookies";
4
4
  //#region src/proxy.ts
5
5
  const electronProxyClient = (options) => {
@@ -1,5 +1,6 @@
1
- import { d as Storage } from "./client-Dfn6XsLf.mjs";
1
+ import { d as Storage } from "./client-D1E7e0Mq.mjs";
2
2
  import { Options } from "conf";
3
+
3
4
  //#region src/storage.d.ts
4
5
  declare const storage: (opts?: Options<Record<string, any>> | undefined) => Storage;
5
6
  //#endregion
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.6.27";
3
+ const PACKAGE_VERSION = "1.6.28";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/electron",
3
- "version": "1.6.27",
3
+ "version": "1.6.28",
4
4
  "description": "Better Auth integration for Electron applications.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -79,9 +79,9 @@
79
79
  "@types/better-sqlite3": "^7.6.13",
80
80
  "better-sqlite3": "^12.6.2",
81
81
  "electron": "^43.1.1",
82
- "tsdown": "0.22.7",
83
- "@better-auth/core": "1.6.27",
84
- "better-auth": "1.6.27"
82
+ "tsdown": "0.21.10",
83
+ "@better-auth/core": "1.6.28",
84
+ "better-auth": "1.6.28"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "@better-auth/utils": "0.4.2",
@@ -89,8 +89,8 @@
89
89
  "better-call": "1.4.0",
90
90
  "conf": "^15.0.2",
91
91
  "electron": ">=36.0.0",
92
- "@better-auth/core": "^1.6.27",
93
- "better-auth": "^1.6.27"
92
+ "@better-auth/core": "^1.6.28",
93
+ "better-auth": "^1.6.28"
94
94
  },
95
95
  "peerDependenciesMeta": {
96
96
  "electron": {
File without changes