@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.
- package/dist/{client-Dfn6XsLf.d.mts → client-D1E7e0Mq.d.mts} +41 -26
- package/dist/client.d.mts +2 -2
- package/dist/client.mjs +3 -3
- package/dist/index.d.mts +37 -33
- package/dist/index.mjs +1 -1
- package/dist/preload.d.mts +0 -2
- package/dist/proxy.d.mts +2 -1
- package/dist/proxy.mjs +2 -2
- package/dist/storage.d.mts +2 -1
- package/dist/{version-B4oCeoTU.mjs → version-6ZHwEASO.mjs} +1 -1
- package/package.json +6 -6
- /package/dist/{utils-C5XBRvIU.mjs → utils-DxDKRT6e.mjs} +0 -0
|
@@ -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({
|
|
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({
|
|
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:
|
|
320
|
-
onResponse?: ((context:
|
|
321
|
-
onSuccess?: ((context:
|
|
322
|
-
onError?: ((context:
|
|
323
|
-
onRetry?: ((response:
|
|
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?:
|
|
329
|
-
plugins?:
|
|
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?:
|
|
370
|
+
retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
|
|
356
371
|
retryAttempt?: number | undefined;
|
|
357
|
-
output?: (
|
|
358
|
-
errorSchema?:
|
|
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:
|
|
376
|
-
onResponse?: ((context:
|
|
377
|
-
onSuccess?: ((context:
|
|
378
|
-
onError?: ((context:
|
|
379
|
-
onRetry?: ((response:
|
|
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?:
|
|
385
|
-
plugins?:
|
|
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?:
|
|
426
|
+
retry?: _$_better_fetch_fetch0.RetryOptions | undefined;
|
|
412
427
|
retryAttempt?: number | undefined;
|
|
413
|
-
output?: (
|
|
414
|
-
errorSchema?:
|
|
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:
|
|
420
|
-
onError: (context:
|
|
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:
|
|
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:
|
|
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-
|
|
2
|
-
export {
|
|
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-
|
|
2
|
-
import { n as isProcessType, r as parseProtocolScheme, t as getChannelPrefixWithDelimiter } from "./utils-
|
|
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,
|
|
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-
|
|
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:
|
|
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:
|
|
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:
|
|
25
|
-
options:
|
|
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:
|
|
99
|
-
authCookies:
|
|
100
|
-
logger: ReturnType<typeof
|
|
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<
|
|
107
|
-
adapter:
|
|
108
|
-
internalAdapter:
|
|
109
|
-
createAuthCookie: (cookieName: string, overrideAttributes?: Partial<
|
|
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 |
|
|
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:
|
|
126
|
+
model: _$better_auth0.ModelNames;
|
|
123
127
|
size?: number | undefined;
|
|
124
128
|
}) => string | false;
|
|
125
|
-
secondaryStorage:
|
|
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:
|
|
140
|
+
checkPassword: (userId: string, ctx: _$_better_auth_core0.GenericEndpointContext<_$better_auth0.BetterAuthOptions>) => Promise<boolean>;
|
|
137
141
|
};
|
|
138
|
-
tables:
|
|
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) =>
|
|
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:
|
|
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:
|
|
200
|
+
user: _$better_auth0.User & Record<string, any>;
|
|
197
201
|
}>;
|
|
198
|
-
electronInitOAuthProxy:
|
|
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?:
|
|
249
|
+
user?: _$better_auth0.User & Record<string, any>;
|
|
246
250
|
token?: string;
|
|
247
251
|
} | undefined>;
|
|
248
|
-
electronTransferUser:
|
|
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:
|
|
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:
|
|
329
|
-
INVALID_CLIENT_ID:
|
|
330
|
-
STATE_MISMATCH:
|
|
331
|
-
MISSING_CODE_CHALLENGE:
|
|
332
|
-
INVALID_CODE_VERIFIER:
|
|
333
|
-
MISSING_STATE:
|
|
334
|
-
MISSING_PKCE:
|
|
335
|
-
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 {
|
|
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-
|
|
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";
|
package/dist/preload.d.mts
CHANGED
|
@@ -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-
|
|
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-
|
|
2
|
-
import { r as parseProtocolScheme } from "./utils-
|
|
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) => {
|
package/dist/storage.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { d as Storage } from "./client-
|
|
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
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/electron",
|
|
3
|
-
"version": "1.6.
|
|
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.
|
|
83
|
-
"@better-auth/core": "1.6.
|
|
84
|
-
"better-auth": "1.6.
|
|
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.
|
|
93
|
-
"better-auth": "^1.6.
|
|
92
|
+
"@better-auth/core": "^1.6.28",
|
|
93
|
+
"better-auth": "^1.6.28"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
96
96
|
"electron": {
|
|
File without changes
|