@better-auth/electron 1.7.0-beta.2 → 1.7.0-beta.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/dist/{client-D6xRwPM0.d.mts → client-DIzl-aw0.d.mts} +1 -0
- package/dist/client.d.mts +1 -1
- package/dist/client.mjs +9 -6
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/preload.d.mts +253 -56
- package/dist/proxy.d.mts +1 -1
- package/dist/proxy.mjs +1 -1
- package/dist/storage.d.mts +1 -1
- package/dist/{version-BVHIqaH7.mjs → version-5EiO_U3Z.mjs} +1 -1
- package/package.json +6 -6
|
@@ -248,6 +248,7 @@ declare const requestAuthOptionsSchema: z.ZodObject<{
|
|
|
248
248
|
disableRedirect: z.ZodOptional<z.ZodBoolean>;
|
|
249
249
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
250
|
requestSignUp: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
additionalParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
251
252
|
additionalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
252
253
|
}, z.core.$strip>;
|
|
253
254
|
type ElectronRequestAuthOptions = z.infer<typeof requestAuthOptionsSchema>;
|
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-
|
|
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-DIzl-aw0.mjs";
|
|
2
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,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-5EiO_U3Z.mjs";
|
|
2
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";
|
|
@@ -8,7 +8,7 @@ import * as z from "zod";
|
|
|
8
8
|
import { Buffer } from "node:buffer";
|
|
9
9
|
import { createHash } from "@better-auth/utils/hash";
|
|
10
10
|
import { signInSocial } from "better-auth/api";
|
|
11
|
-
import { parseSetCookieHeader } from "better-auth/cookies";
|
|
11
|
+
import { cookieNameRegex, parseSetCookieHeader } from "better-auth/cookies";
|
|
12
12
|
import electron, { shell } from "electron";
|
|
13
13
|
import { isDevelopment as isDevelopment$1 } from "@better-auth/core/env";
|
|
14
14
|
import { isPublicRoutableHost } from "@better-auth/core/utils/host";
|
|
@@ -474,10 +474,13 @@ function getCookie(cookie) {
|
|
|
474
474
|
try {
|
|
475
475
|
parsed = JSON.parse(cookie);
|
|
476
476
|
} catch (_e) {}
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
477
|
+
const pairs = [];
|
|
478
|
+
for (const [key, value] of Object.entries(parsed)) {
|
|
479
|
+
if (value.expires && new Date(value.expires) < /* @__PURE__ */ new Date()) continue;
|
|
480
|
+
if (!cookieNameRegex.test(key)) continue;
|
|
481
|
+
pairs.push(`${key}=${encodeURIComponent(value.value)}`);
|
|
482
|
+
}
|
|
483
|
+
return pairs.join("; ");
|
|
481
484
|
}
|
|
482
485
|
/**
|
|
483
486
|
* Compare if session cookies have actually changed by comparing their values.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-DIzl-aw0.mjs";
|
|
2
2
|
import * as better_auth0 from "better-auth";
|
|
3
3
|
import * as z from "zod";
|
|
4
4
|
import * as _better_auth_core0 from "@better-auth/core";
|
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-5EiO_U3Z.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
|
@@ -30,6 +30,7 @@ type DBAdapterDebugLogOption = boolean | {
|
|
|
30
30
|
findMany?: boolean | undefined;
|
|
31
31
|
delete?: boolean | undefined;
|
|
32
32
|
deleteMany?: boolean | undefined;
|
|
33
|
+
consumeOne?: boolean | undefined;
|
|
33
34
|
count?: boolean | undefined;
|
|
34
35
|
} | {
|
|
35
36
|
/**
|
|
@@ -205,7 +206,7 @@ interface DBAdapterFactoryConfig<Options extends BetterAuthOptions = BetterAuthO
|
|
|
205
206
|
/**
|
|
206
207
|
* The action which was called from the adapter.
|
|
207
208
|
*/
|
|
208
|
-
action: "create" | "update" | "findOne" | "findMany" | "updateMany" | "delete" | "deleteMany" | "count";
|
|
209
|
+
action: "create" | "update" | "findOne" | "findMany" | "updateMany" | "delete" | "deleteMany" | "consumeOne" | "count";
|
|
209
210
|
/**
|
|
210
211
|
* The model name.
|
|
211
212
|
*/
|
|
@@ -423,6 +424,26 @@ type DBAdapter<Options extends BetterAuthOptions = BetterAuthOptions> = {
|
|
|
423
424
|
model: string;
|
|
424
425
|
where: Where[];
|
|
425
426
|
}) => Promise<number>;
|
|
427
|
+
/**
|
|
428
|
+
* Atomically consume a single row matching the where clause: delete it and
|
|
429
|
+
* return the deleted row, or return `null` if no row matched.
|
|
430
|
+
* Implementations MUST NOT delete any additional rows that also match a
|
|
431
|
+
* non-unique predicate.
|
|
432
|
+
*
|
|
433
|
+
* Under concurrent invocation against the same row, exactly one caller
|
|
434
|
+
* receives the row; subsequent racers receive `null`. This is the
|
|
435
|
+
* race-safe primitive for consuming single-use credentials
|
|
436
|
+
* (verification tokens, authorization codes, one-time tokens).
|
|
437
|
+
*
|
|
438
|
+
* Always defined on the factory-wrapped adapter. When the underlying
|
|
439
|
+
* `CustomAdapter` does not implement `consumeOne`, the factory provides
|
|
440
|
+
* a fallback that wraps `findMany + deleteMany` in `transaction(...)`
|
|
441
|
+
* and returns the row only when the delete reports an affected row.
|
|
442
|
+
*/
|
|
443
|
+
consumeOne: <T>(data: {
|
|
444
|
+
model: string;
|
|
445
|
+
where: Where[];
|
|
446
|
+
}) => Promise<T | null>;
|
|
426
447
|
/**
|
|
427
448
|
* Execute multiple operations in a transaction.
|
|
428
449
|
* If the adapter doesn't support transactions, operations will be executed sequentially.
|
|
@@ -504,6 +525,19 @@ interface CustomAdapter {
|
|
|
504
525
|
model: string;
|
|
505
526
|
where: CleanedWhere[];
|
|
506
527
|
}) => Promise<number>;
|
|
528
|
+
/**
|
|
529
|
+
* Optional native atomic single-row consume. When omitted, the adapter
|
|
530
|
+
* factory falls back to `transaction(findMany + deleteMany)`.
|
|
531
|
+
* Implementing this method natively (e.g. `DELETE ... RETURNING *`,
|
|
532
|
+
* `findOneAndDelete`, `OUTPUT deleted.*`) gives one round trip and the
|
|
533
|
+
* strongest race-safety guarantee. Implementations must delete at most
|
|
534
|
+
* one matching row. TODO(consume-one-required): tighten to required in the
|
|
535
|
+
* next minor on `next`.
|
|
536
|
+
*/
|
|
537
|
+
consumeOne?: <T>(data: {
|
|
538
|
+
model: string;
|
|
539
|
+
where: CleanedWhere[];
|
|
540
|
+
}) => Promise<T | null>;
|
|
507
541
|
count: ({
|
|
508
542
|
model,
|
|
509
543
|
where
|
|
@@ -640,6 +674,13 @@ interface OAuthProvider<T extends Record<string, any> = Record<string, any>, O e
|
|
|
640
674
|
redirectURI: string;
|
|
641
675
|
display?: string | undefined;
|
|
642
676
|
loginHint?: string | undefined;
|
|
677
|
+
/**
|
|
678
|
+
* Extra query parameters to append to the authorization URL.
|
|
679
|
+
* Providers forward these to the shared `createAuthorizationURL` helper,
|
|
680
|
+
* which drops any keys present in `RESERVED_AUTHORIZATION_PARAMS`
|
|
681
|
+
* before applying them.
|
|
682
|
+
*/
|
|
683
|
+
additionalParams?: Record<string, string> | undefined;
|
|
643
684
|
}) => Awaitable<URL>;
|
|
644
685
|
name: string;
|
|
645
686
|
validateAuthorizationCode: (data: {
|
|
@@ -691,6 +732,17 @@ interface OAuthProvider<T extends Record<string, any> = Record<string, any>, O e
|
|
|
691
732
|
* Disable sign up for new users.
|
|
692
733
|
*/
|
|
693
734
|
disableSignUp?: boolean | undefined;
|
|
735
|
+
/**
|
|
736
|
+
* Accept callbacks that arrive without a `state` parameter. When true,
|
|
737
|
+
* the shared OAuth callback handler restarts the flow server-side with
|
|
738
|
+
* fresh `state` and PKCE instead of rejecting the request. Intended for
|
|
739
|
+
* providers that initiate OAuth without RP-side flow kickoff (e.g.
|
|
740
|
+
* Clever). Leave unset for any provider that always initiates from the
|
|
741
|
+
* RP.
|
|
742
|
+
*
|
|
743
|
+
* @default false
|
|
744
|
+
*/
|
|
745
|
+
allowIdpInitiated?: boolean | undefined;
|
|
694
746
|
/**
|
|
695
747
|
* Options for the provider
|
|
696
748
|
*/
|
|
@@ -700,9 +752,10 @@ type ProviderOptions<Profile extends Record<string, any> = any> = {
|
|
|
700
752
|
/**
|
|
701
753
|
* The client ID of your application.
|
|
702
754
|
*
|
|
703
|
-
*
|
|
755
|
+
* Some providers accept multiple platform client IDs. The first entry is the
|
|
756
|
+
* primary client ID used for token endpoint client authentication.
|
|
704
757
|
*/
|
|
705
|
-
clientId?:
|
|
758
|
+
clientId?: LiteralString | string[] | undefined;
|
|
706
759
|
/**
|
|
707
760
|
* The client secret of your application
|
|
708
761
|
*/
|
|
@@ -819,7 +872,7 @@ interface AppleProfile {
|
|
|
819
872
|
* The email address is either the user's real email address or the proxy
|
|
820
873
|
* address, depending on their status private email relay service.
|
|
821
874
|
*/
|
|
822
|
-
email
|
|
875
|
+
email?: string;
|
|
823
876
|
/**
|
|
824
877
|
* A string or Boolean value that indicates whether the service verifies
|
|
825
878
|
* the email. The value can either be a string ("true" or "false") or a
|
|
@@ -925,6 +978,19 @@ interface CognitoOptions extends ProviderOptions<CognitoProfile> {
|
|
|
925
978
|
region: string;
|
|
926
979
|
userPoolId: string;
|
|
927
980
|
requireClientSecret?: boolean | undefined;
|
|
981
|
+
/**
|
|
982
|
+
* Skip the Cognito hosted-UI identity-provider picker by preselecting an
|
|
983
|
+
* IdP (maps to the `identity_provider` query parameter on the authorize
|
|
984
|
+
* request). Accepts `"COGNITO"`, a SAML/OIDC provider name configured on
|
|
985
|
+
* the User Pool, or one of the social providers (`"Google"`, `"Facebook"`,
|
|
986
|
+
* `"LoginWithAmazon"`, `"SignInWithApple"`).
|
|
987
|
+
*
|
|
988
|
+
* Per-request overrides via `signIn.social({ additionalParams: { identity_provider } })`
|
|
989
|
+
* take precedence over this value.
|
|
990
|
+
*
|
|
991
|
+
* @see https://docs.aws.amazon.com/cognito/latest/developerguide/authorization-endpoint.html
|
|
992
|
+
*/
|
|
993
|
+
identityProvider?: string | undefined;
|
|
928
994
|
}
|
|
929
995
|
//#endregion
|
|
930
996
|
//#region ../core/dist/social-providers/discord.d.mts
|
|
@@ -967,7 +1033,7 @@ interface DiscordProfile extends Record<string, any> {
|
|
|
967
1033
|
/** whether the email on this account has been verified */
|
|
968
1034
|
verified: boolean;
|
|
969
1035
|
/** the user's email */
|
|
970
|
-
email
|
|
1036
|
+
email?: string | null;
|
|
971
1037
|
/**
|
|
972
1038
|
* the flags on a user's account:
|
|
973
1039
|
* https://discord.com/developers/docs/resources/user#user-object-user-flags
|
|
@@ -1009,8 +1075,8 @@ interface DiscordOptions extends ProviderOptions<DiscordProfile> {
|
|
|
1009
1075
|
interface FacebookProfile {
|
|
1010
1076
|
id: string;
|
|
1011
1077
|
name: string;
|
|
1012
|
-
email
|
|
1013
|
-
email_verified
|
|
1078
|
+
email?: string;
|
|
1079
|
+
email_verified?: boolean;
|
|
1014
1080
|
picture: {
|
|
1015
1081
|
data: {
|
|
1016
1082
|
height: number;
|
|
@@ -1071,7 +1137,7 @@ interface GithubProfile {
|
|
|
1071
1137
|
company: string;
|
|
1072
1138
|
blog: string;
|
|
1073
1139
|
location: string;
|
|
1074
|
-
email: string;
|
|
1140
|
+
email: string | null;
|
|
1075
1141
|
hireable: boolean;
|
|
1076
1142
|
bio: string;
|
|
1077
1143
|
twitter_username: string;
|
|
@@ -1125,7 +1191,7 @@ interface MicrosoftEntraIDProfile extends Record<string, any> {
|
|
|
1125
1191
|
/** The primary username that represents the user */
|
|
1126
1192
|
preferred_username: string;
|
|
1127
1193
|
/** User's email address */
|
|
1128
|
-
email
|
|
1194
|
+
email?: string;
|
|
1129
1195
|
/** Human-readable value that identifies the subject of the token */
|
|
1130
1196
|
name: string;
|
|
1131
1197
|
/** Matches the parameter included in the original authorize request */
|
|
@@ -1539,8 +1605,8 @@ interface LinkedInProfile {
|
|
|
1539
1605
|
country: string;
|
|
1540
1606
|
language: string;
|
|
1541
1607
|
};
|
|
1542
|
-
email
|
|
1543
|
-
email_verified
|
|
1608
|
+
email?: string;
|
|
1609
|
+
email_verified?: boolean;
|
|
1544
1610
|
}
|
|
1545
1611
|
interface LinkedInOptions extends ProviderOptions<LinkedInProfile> {
|
|
1546
1612
|
clientId: string;
|
|
@@ -2141,7 +2207,8 @@ declare const socialProviders: {
|
|
|
2141
2207
|
createAuthorizationURL({
|
|
2142
2208
|
state,
|
|
2143
2209
|
scopes,
|
|
2144
|
-
redirectURI
|
|
2210
|
+
redirectURI,
|
|
2211
|
+
additionalParams
|
|
2145
2212
|
}: {
|
|
2146
2213
|
state: string;
|
|
2147
2214
|
codeVerifier: string;
|
|
@@ -2149,6 +2216,7 @@ declare const socialProviders: {
|
|
|
2149
2216
|
redirectURI: string;
|
|
2150
2217
|
display?: string | undefined;
|
|
2151
2218
|
loginHint?: string | undefined;
|
|
2219
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2152
2220
|
}): Promise<URL>;
|
|
2153
2221
|
validateAuthorizationCode: ({
|
|
2154
2222
|
code,
|
|
@@ -2190,7 +2258,8 @@ declare const socialProviders: {
|
|
|
2190
2258
|
state,
|
|
2191
2259
|
scopes,
|
|
2192
2260
|
codeVerifier,
|
|
2193
|
-
redirectURI
|
|
2261
|
+
redirectURI,
|
|
2262
|
+
additionalParams
|
|
2194
2263
|
}: {
|
|
2195
2264
|
state: string;
|
|
2196
2265
|
codeVerifier: string;
|
|
@@ -2198,6 +2267,7 @@ declare const socialProviders: {
|
|
|
2198
2267
|
redirectURI: string;
|
|
2199
2268
|
display?: string | undefined;
|
|
2200
2269
|
loginHint?: string | undefined;
|
|
2270
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2201
2271
|
}): Promise<URL>;
|
|
2202
2272
|
validateAuthorizationCode: ({
|
|
2203
2273
|
code,
|
|
@@ -2238,7 +2308,8 @@ declare const socialProviders: {
|
|
|
2238
2308
|
state,
|
|
2239
2309
|
scopes,
|
|
2240
2310
|
codeVerifier,
|
|
2241
|
-
redirectURI
|
|
2311
|
+
redirectURI,
|
|
2312
|
+
additionalParams
|
|
2242
2313
|
}: {
|
|
2243
2314
|
state: string;
|
|
2244
2315
|
codeVerifier: string;
|
|
@@ -2246,6 +2317,7 @@ declare const socialProviders: {
|
|
|
2246
2317
|
redirectURI: string;
|
|
2247
2318
|
display?: string | undefined;
|
|
2248
2319
|
loginHint?: string | undefined;
|
|
2320
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2249
2321
|
}): Promise<URL>;
|
|
2250
2322
|
validateAuthorizationCode: ({
|
|
2251
2323
|
code,
|
|
@@ -2286,7 +2358,8 @@ declare const socialProviders: {
|
|
|
2286
2358
|
createAuthorizationURL({
|
|
2287
2359
|
state,
|
|
2288
2360
|
scopes,
|
|
2289
|
-
redirectURI
|
|
2361
|
+
redirectURI,
|
|
2362
|
+
additionalParams
|
|
2290
2363
|
}: {
|
|
2291
2364
|
state: string;
|
|
2292
2365
|
codeVerifier: string;
|
|
@@ -2294,7 +2367,8 @@ declare const socialProviders: {
|
|
|
2294
2367
|
redirectURI: string;
|
|
2295
2368
|
display?: string | undefined;
|
|
2296
2369
|
loginHint?: string | undefined;
|
|
2297
|
-
|
|
2370
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2371
|
+
}): Promise<URL>;
|
|
2298
2372
|
validateAuthorizationCode: ({
|
|
2299
2373
|
code,
|
|
2300
2374
|
redirectURI
|
|
@@ -2333,7 +2407,8 @@ declare const socialProviders: {
|
|
|
2333
2407
|
state,
|
|
2334
2408
|
scopes,
|
|
2335
2409
|
redirectURI,
|
|
2336
|
-
loginHint
|
|
2410
|
+
loginHint,
|
|
2411
|
+
additionalParams
|
|
2337
2412
|
}: {
|
|
2338
2413
|
state: string;
|
|
2339
2414
|
codeVerifier: string;
|
|
@@ -2341,6 +2416,7 @@ declare const socialProviders: {
|
|
|
2341
2416
|
redirectURI: string;
|
|
2342
2417
|
display?: string | undefined;
|
|
2343
2418
|
loginHint?: string | undefined;
|
|
2419
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2344
2420
|
}): Promise<URL>;
|
|
2345
2421
|
validateAuthorizationCode: ({
|
|
2346
2422
|
code,
|
|
@@ -2381,7 +2457,8 @@ declare const socialProviders: {
|
|
|
2381
2457
|
state,
|
|
2382
2458
|
scopes,
|
|
2383
2459
|
codeVerifier,
|
|
2384
|
-
redirectURI
|
|
2460
|
+
redirectURI,
|
|
2461
|
+
additionalParams
|
|
2385
2462
|
}: {
|
|
2386
2463
|
state: string;
|
|
2387
2464
|
codeVerifier: string;
|
|
@@ -2389,6 +2466,7 @@ declare const socialProviders: {
|
|
|
2389
2466
|
redirectURI: string;
|
|
2390
2467
|
display?: string | undefined;
|
|
2391
2468
|
loginHint?: string | undefined;
|
|
2469
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2392
2470
|
}): Promise<URL>;
|
|
2393
2471
|
validateAuthorizationCode: ({
|
|
2394
2472
|
code,
|
|
@@ -2430,7 +2508,8 @@ declare const socialProviders: {
|
|
|
2430
2508
|
scopes,
|
|
2431
2509
|
loginHint,
|
|
2432
2510
|
codeVerifier,
|
|
2433
|
-
redirectURI
|
|
2511
|
+
redirectURI,
|
|
2512
|
+
additionalParams
|
|
2434
2513
|
}: {
|
|
2435
2514
|
state: string;
|
|
2436
2515
|
codeVerifier: string;
|
|
@@ -2438,6 +2517,7 @@ declare const socialProviders: {
|
|
|
2438
2517
|
redirectURI: string;
|
|
2439
2518
|
display?: string | undefined;
|
|
2440
2519
|
loginHint?: string | undefined;
|
|
2520
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2441
2521
|
}): Promise<URL>;
|
|
2442
2522
|
validateAuthorizationCode: ({
|
|
2443
2523
|
code,
|
|
@@ -2481,6 +2561,7 @@ declare const socialProviders: {
|
|
|
2481
2561
|
redirectURI: string;
|
|
2482
2562
|
display?: string | undefined;
|
|
2483
2563
|
loginHint?: string | undefined;
|
|
2564
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2484
2565
|
}): Promise<URL>;
|
|
2485
2566
|
validateAuthorizationCode({
|
|
2486
2567
|
code,
|
|
@@ -2524,7 +2605,8 @@ declare const socialProviders: {
|
|
|
2524
2605
|
codeVerifier,
|
|
2525
2606
|
redirectURI,
|
|
2526
2607
|
loginHint,
|
|
2527
|
-
display
|
|
2608
|
+
display,
|
|
2609
|
+
additionalParams
|
|
2528
2610
|
}: {
|
|
2529
2611
|
state: string;
|
|
2530
2612
|
codeVerifier: string;
|
|
@@ -2532,6 +2614,7 @@ declare const socialProviders: {
|
|
|
2532
2614
|
redirectURI: string;
|
|
2533
2615
|
display?: string | undefined;
|
|
2534
2616
|
loginHint?: string | undefined;
|
|
2617
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2535
2618
|
}): Promise<URL>;
|
|
2536
2619
|
validateAuthorizationCode: ({
|
|
2537
2620
|
code,
|
|
@@ -2573,7 +2656,8 @@ declare const socialProviders: {
|
|
|
2573
2656
|
state,
|
|
2574
2657
|
scopes,
|
|
2575
2658
|
codeVerifier,
|
|
2576
|
-
redirectURI
|
|
2659
|
+
redirectURI,
|
|
2660
|
+
additionalParams
|
|
2577
2661
|
}: {
|
|
2578
2662
|
state: string;
|
|
2579
2663
|
codeVerifier: string;
|
|
@@ -2581,6 +2665,7 @@ declare const socialProviders: {
|
|
|
2581
2665
|
redirectURI: string;
|
|
2582
2666
|
display?: string | undefined;
|
|
2583
2667
|
loginHint?: string | undefined;
|
|
2668
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2584
2669
|
}): Promise<URL>;
|
|
2585
2670
|
validateAuthorizationCode: ({
|
|
2586
2671
|
code,
|
|
@@ -2620,7 +2705,8 @@ declare const socialProviders: {
|
|
|
2620
2705
|
createAuthorizationURL({
|
|
2621
2706
|
state,
|
|
2622
2707
|
scopes,
|
|
2623
|
-
redirectURI
|
|
2708
|
+
redirectURI,
|
|
2709
|
+
additionalParams
|
|
2624
2710
|
}: {
|
|
2625
2711
|
state: string;
|
|
2626
2712
|
codeVerifier: string;
|
|
@@ -2628,7 +2714,8 @@ declare const socialProviders: {
|
|
|
2628
2714
|
redirectURI: string;
|
|
2629
2715
|
display?: string | undefined;
|
|
2630
2716
|
loginHint?: string | undefined;
|
|
2631
|
-
|
|
2717
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2718
|
+
}): Promise<URL>;
|
|
2632
2719
|
validateAuthorizationCode: ({
|
|
2633
2720
|
code,
|
|
2634
2721
|
redirectURI
|
|
@@ -2667,7 +2754,8 @@ declare const socialProviders: {
|
|
|
2667
2754
|
state,
|
|
2668
2755
|
scopes,
|
|
2669
2756
|
codeVerifier,
|
|
2670
|
-
redirectURI
|
|
2757
|
+
redirectURI,
|
|
2758
|
+
additionalParams
|
|
2671
2759
|
}: {
|
|
2672
2760
|
state: string;
|
|
2673
2761
|
codeVerifier: string;
|
|
@@ -2675,6 +2763,7 @@ declare const socialProviders: {
|
|
|
2675
2763
|
redirectURI: string;
|
|
2676
2764
|
display?: string | undefined;
|
|
2677
2765
|
loginHint?: string | undefined;
|
|
2766
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2678
2767
|
}): Promise<URL>;
|
|
2679
2768
|
validateAuthorizationCode: ({
|
|
2680
2769
|
code,
|
|
@@ -2714,7 +2803,8 @@ declare const socialProviders: {
|
|
|
2714
2803
|
createAuthorizationURL({
|
|
2715
2804
|
state,
|
|
2716
2805
|
scopes,
|
|
2717
|
-
redirectURI
|
|
2806
|
+
redirectURI,
|
|
2807
|
+
additionalParams
|
|
2718
2808
|
}: {
|
|
2719
2809
|
state: string;
|
|
2720
2810
|
codeVerifier: string;
|
|
@@ -2722,6 +2812,7 @@ declare const socialProviders: {
|
|
|
2722
2812
|
redirectURI: string;
|
|
2723
2813
|
display?: string | undefined;
|
|
2724
2814
|
loginHint?: string | undefined;
|
|
2815
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2725
2816
|
}): Promise<URL>;
|
|
2726
2817
|
validateAuthorizationCode: ({
|
|
2727
2818
|
code,
|
|
@@ -2764,6 +2855,7 @@ declare const socialProviders: {
|
|
|
2764
2855
|
redirectURI: string;
|
|
2765
2856
|
display?: string | undefined;
|
|
2766
2857
|
loginHint?: string | undefined;
|
|
2858
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2767
2859
|
}): Promise<URL>;
|
|
2768
2860
|
validateAuthorizationCode: ({
|
|
2769
2861
|
code,
|
|
@@ -2804,7 +2896,8 @@ declare const socialProviders: {
|
|
|
2804
2896
|
state,
|
|
2805
2897
|
scopes,
|
|
2806
2898
|
codeVerifier,
|
|
2807
|
-
redirectURI
|
|
2899
|
+
redirectURI,
|
|
2900
|
+
additionalParams
|
|
2808
2901
|
}: {
|
|
2809
2902
|
state: string;
|
|
2810
2903
|
codeVerifier: string;
|
|
@@ -2812,6 +2905,7 @@ declare const socialProviders: {
|
|
|
2812
2905
|
redirectURI: string;
|
|
2813
2906
|
display?: string | undefined;
|
|
2814
2907
|
loginHint?: string | undefined;
|
|
2908
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2815
2909
|
}) => Promise<URL>;
|
|
2816
2910
|
validateAuthorizationCode: ({
|
|
2817
2911
|
code,
|
|
@@ -2852,7 +2946,8 @@ declare const socialProviders: {
|
|
|
2852
2946
|
state,
|
|
2853
2947
|
scopes,
|
|
2854
2948
|
redirectURI,
|
|
2855
|
-
codeVerifier
|
|
2949
|
+
codeVerifier,
|
|
2950
|
+
additionalParams
|
|
2856
2951
|
}: {
|
|
2857
2952
|
state: string;
|
|
2858
2953
|
codeVerifier: string;
|
|
@@ -2860,6 +2955,7 @@ declare const socialProviders: {
|
|
|
2860
2955
|
redirectURI: string;
|
|
2861
2956
|
display?: string | undefined;
|
|
2862
2957
|
loginHint?: string | undefined;
|
|
2958
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2863
2959
|
}): Promise<URL>;
|
|
2864
2960
|
validateAuthorizationCode({
|
|
2865
2961
|
code,
|
|
@@ -2900,7 +2996,8 @@ declare const socialProviders: {
|
|
|
2900
2996
|
state,
|
|
2901
2997
|
scopes,
|
|
2902
2998
|
loginHint,
|
|
2903
|
-
redirectURI
|
|
2999
|
+
redirectURI,
|
|
3000
|
+
additionalParams
|
|
2904
3001
|
}: {
|
|
2905
3002
|
state: string;
|
|
2906
3003
|
codeVerifier: string;
|
|
@@ -2908,6 +3005,7 @@ declare const socialProviders: {
|
|
|
2908
3005
|
redirectURI: string;
|
|
2909
3006
|
display?: string | undefined;
|
|
2910
3007
|
loginHint?: string | undefined;
|
|
3008
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2911
3009
|
}): Promise<URL>;
|
|
2912
3010
|
validateAuthorizationCode: ({
|
|
2913
3011
|
code,
|
|
@@ -2947,7 +3045,8 @@ declare const socialProviders: {
|
|
|
2947
3045
|
state,
|
|
2948
3046
|
scopes,
|
|
2949
3047
|
redirectURI,
|
|
2950
|
-
loginHint
|
|
3048
|
+
loginHint,
|
|
3049
|
+
additionalParams
|
|
2951
3050
|
}: {
|
|
2952
3051
|
state: string;
|
|
2953
3052
|
codeVerifier: string;
|
|
@@ -2955,6 +3054,7 @@ declare const socialProviders: {
|
|
|
2955
3054
|
redirectURI: string;
|
|
2956
3055
|
display?: string | undefined;
|
|
2957
3056
|
loginHint?: string | undefined;
|
|
3057
|
+
additionalParams?: Record<string, string> | undefined;
|
|
2958
3058
|
}) => Promise<URL>;
|
|
2959
3059
|
validateAuthorizationCode: ({
|
|
2960
3060
|
code,
|
|
@@ -2995,7 +3095,8 @@ declare const socialProviders: {
|
|
|
2995
3095
|
scopes,
|
|
2996
3096
|
codeVerifier,
|
|
2997
3097
|
loginHint,
|
|
2998
|
-
redirectURI
|
|
3098
|
+
redirectURI,
|
|
3099
|
+
additionalParams
|
|
2999
3100
|
}: {
|
|
3000
3101
|
state: string;
|
|
3001
3102
|
codeVerifier: string;
|
|
@@ -3003,6 +3104,7 @@ declare const socialProviders: {
|
|
|
3003
3104
|
redirectURI: string;
|
|
3004
3105
|
display?: string | undefined;
|
|
3005
3106
|
loginHint?: string | undefined;
|
|
3107
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3006
3108
|
}) => Promise<URL>;
|
|
3007
3109
|
validateAuthorizationCode: ({
|
|
3008
3110
|
code,
|
|
@@ -3063,7 +3165,8 @@ declare const socialProviders: {
|
|
|
3063
3165
|
createAuthorizationURL({
|
|
3064
3166
|
state,
|
|
3065
3167
|
scopes,
|
|
3066
|
-
redirectURI
|
|
3168
|
+
redirectURI,
|
|
3169
|
+
additionalParams
|
|
3067
3170
|
}: {
|
|
3068
3171
|
state: string;
|
|
3069
3172
|
codeVerifier: string;
|
|
@@ -3071,6 +3174,7 @@ declare const socialProviders: {
|
|
|
3071
3174
|
redirectURI: string;
|
|
3072
3175
|
display?: string | undefined;
|
|
3073
3176
|
loginHint?: string | undefined;
|
|
3177
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3074
3178
|
}): URL;
|
|
3075
3179
|
validateAuthorizationCode: ({
|
|
3076
3180
|
code,
|
|
@@ -3109,7 +3213,8 @@ declare const socialProviders: {
|
|
|
3109
3213
|
createAuthorizationURL({
|
|
3110
3214
|
state,
|
|
3111
3215
|
scopes,
|
|
3112
|
-
redirectURI
|
|
3216
|
+
redirectURI,
|
|
3217
|
+
additionalParams
|
|
3113
3218
|
}: {
|
|
3114
3219
|
state: string;
|
|
3115
3220
|
codeVerifier: string;
|
|
@@ -3117,6 +3222,7 @@ declare const socialProviders: {
|
|
|
3117
3222
|
redirectURI: string;
|
|
3118
3223
|
display?: string | undefined;
|
|
3119
3224
|
loginHint?: string | undefined;
|
|
3225
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3120
3226
|
}): Promise<URL>;
|
|
3121
3227
|
validateAuthorizationCode: ({
|
|
3122
3228
|
code,
|
|
@@ -3155,7 +3261,8 @@ declare const socialProviders: {
|
|
|
3155
3261
|
createAuthorizationURL({
|
|
3156
3262
|
state,
|
|
3157
3263
|
scopes,
|
|
3158
|
-
redirectURI
|
|
3264
|
+
redirectURI,
|
|
3265
|
+
additionalParams
|
|
3159
3266
|
}: {
|
|
3160
3267
|
state: string;
|
|
3161
3268
|
codeVerifier: string;
|
|
@@ -3163,7 +3270,8 @@ declare const socialProviders: {
|
|
|
3163
3270
|
redirectURI: string;
|
|
3164
3271
|
display?: string | undefined;
|
|
3165
3272
|
loginHint?: string | undefined;
|
|
3166
|
-
|
|
3273
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3274
|
+
}): Promise<URL>;
|
|
3167
3275
|
validateAuthorizationCode: ({
|
|
3168
3276
|
code,
|
|
3169
3277
|
redirectURI
|
|
@@ -3202,7 +3310,8 @@ declare const socialProviders: {
|
|
|
3202
3310
|
state,
|
|
3203
3311
|
scopes,
|
|
3204
3312
|
codeVerifier,
|
|
3205
|
-
redirectURI
|
|
3313
|
+
redirectURI,
|
|
3314
|
+
additionalParams
|
|
3206
3315
|
}: {
|
|
3207
3316
|
state: string;
|
|
3208
3317
|
codeVerifier: string;
|
|
@@ -3210,6 +3319,7 @@ declare const socialProviders: {
|
|
|
3210
3319
|
redirectURI: string;
|
|
3211
3320
|
display?: string | undefined;
|
|
3212
3321
|
loginHint?: string | undefined;
|
|
3322
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3213
3323
|
}): Promise<URL>;
|
|
3214
3324
|
validateAuthorizationCode: ({
|
|
3215
3325
|
code,
|
|
@@ -3250,7 +3360,8 @@ declare const socialProviders: {
|
|
|
3250
3360
|
state,
|
|
3251
3361
|
scopes,
|
|
3252
3362
|
codeVerifier,
|
|
3253
|
-
redirectURI
|
|
3363
|
+
redirectURI,
|
|
3364
|
+
additionalParams
|
|
3254
3365
|
}: {
|
|
3255
3366
|
state: string;
|
|
3256
3367
|
codeVerifier: string;
|
|
@@ -3258,6 +3369,7 @@ declare const socialProviders: {
|
|
|
3258
3369
|
redirectURI: string;
|
|
3259
3370
|
display?: string | undefined;
|
|
3260
3371
|
loginHint?: string | undefined;
|
|
3372
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3261
3373
|
}): Promise<URL>;
|
|
3262
3374
|
validateAuthorizationCode: ({
|
|
3263
3375
|
code,
|
|
@@ -3298,7 +3410,8 @@ declare const socialProviders: {
|
|
|
3298
3410
|
createAuthorizationURL: ({
|
|
3299
3411
|
state,
|
|
3300
3412
|
redirectURI,
|
|
3301
|
-
codeVerifier
|
|
3413
|
+
codeVerifier,
|
|
3414
|
+
additionalParams
|
|
3302
3415
|
}: {
|
|
3303
3416
|
state: string;
|
|
3304
3417
|
codeVerifier: string;
|
|
@@ -3306,6 +3419,7 @@ declare const socialProviders: {
|
|
|
3306
3419
|
redirectURI: string;
|
|
3307
3420
|
display?: string | undefined;
|
|
3308
3421
|
loginHint?: string | undefined;
|
|
3422
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3309
3423
|
}) => Promise<URL>;
|
|
3310
3424
|
validateAuthorizationCode: ({
|
|
3311
3425
|
code,
|
|
@@ -3345,7 +3459,8 @@ declare const socialProviders: {
|
|
|
3345
3459
|
state,
|
|
3346
3460
|
scopes,
|
|
3347
3461
|
loginHint,
|
|
3348
|
-
redirectURI
|
|
3462
|
+
redirectURI,
|
|
3463
|
+
additionalParams
|
|
3349
3464
|
}: {
|
|
3350
3465
|
state: string;
|
|
3351
3466
|
codeVerifier: string;
|
|
@@ -3353,6 +3468,7 @@ declare const socialProviders: {
|
|
|
3353
3468
|
redirectURI: string;
|
|
3354
3469
|
display?: string | undefined;
|
|
3355
3470
|
loginHint?: string | undefined;
|
|
3471
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3356
3472
|
}): Promise<URL>;
|
|
3357
3473
|
validateAuthorizationCode: ({
|
|
3358
3474
|
code,
|
|
@@ -3391,7 +3507,8 @@ declare const socialProviders: {
|
|
|
3391
3507
|
createAuthorizationURL({
|
|
3392
3508
|
state,
|
|
3393
3509
|
scopes,
|
|
3394
|
-
redirectURI
|
|
3510
|
+
redirectURI,
|
|
3511
|
+
additionalParams
|
|
3395
3512
|
}: {
|
|
3396
3513
|
state: string;
|
|
3397
3514
|
codeVerifier: string;
|
|
@@ -3399,6 +3516,7 @@ declare const socialProviders: {
|
|
|
3399
3516
|
redirectURI: string;
|
|
3400
3517
|
display?: string | undefined;
|
|
3401
3518
|
loginHint?: string | undefined;
|
|
3519
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3402
3520
|
}): Promise<URL>;
|
|
3403
3521
|
validateAuthorizationCode: ({
|
|
3404
3522
|
code,
|
|
@@ -3458,7 +3576,8 @@ declare const socialProviders: {
|
|
|
3458
3576
|
createAuthorizationURL({
|
|
3459
3577
|
state,
|
|
3460
3578
|
scopes,
|
|
3461
|
-
redirectURI
|
|
3579
|
+
redirectURI,
|
|
3580
|
+
additionalParams
|
|
3462
3581
|
}: {
|
|
3463
3582
|
state: string;
|
|
3464
3583
|
codeVerifier: string;
|
|
@@ -3466,6 +3585,7 @@ declare const socialProviders: {
|
|
|
3466
3585
|
redirectURI: string;
|
|
3467
3586
|
display?: string | undefined;
|
|
3468
3587
|
loginHint?: string | undefined;
|
|
3588
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3469
3589
|
}): Promise<URL>;
|
|
3470
3590
|
validateAuthorizationCode: ({
|
|
3471
3591
|
code,
|
|
@@ -3527,7 +3647,8 @@ declare const socialProviders: {
|
|
|
3527
3647
|
scopes,
|
|
3528
3648
|
codeVerifier,
|
|
3529
3649
|
redirectURI,
|
|
3530
|
-
loginHint
|
|
3650
|
+
loginHint,
|
|
3651
|
+
additionalParams
|
|
3531
3652
|
}: {
|
|
3532
3653
|
state: string;
|
|
3533
3654
|
codeVerifier: string;
|
|
@@ -3535,6 +3656,7 @@ declare const socialProviders: {
|
|
|
3535
3656
|
redirectURI: string;
|
|
3536
3657
|
display?: string | undefined;
|
|
3537
3658
|
loginHint?: string | undefined;
|
|
3659
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3538
3660
|
}): Promise<URL>;
|
|
3539
3661
|
validateAuthorizationCode: ({
|
|
3540
3662
|
code,
|
|
@@ -3598,7 +3720,8 @@ declare const socialProviders: {
|
|
|
3598
3720
|
scopes,
|
|
3599
3721
|
codeVerifier,
|
|
3600
3722
|
redirectURI,
|
|
3601
|
-
loginHint
|
|
3723
|
+
loginHint,
|
|
3724
|
+
additionalParams
|
|
3602
3725
|
}: {
|
|
3603
3726
|
state: string;
|
|
3604
3727
|
codeVerifier: string;
|
|
@@ -3606,6 +3729,7 @@ declare const socialProviders: {
|
|
|
3606
3729
|
redirectURI: string;
|
|
3607
3730
|
display?: string | undefined;
|
|
3608
3731
|
loginHint?: string | undefined;
|
|
3732
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3609
3733
|
}): Promise<URL>;
|
|
3610
3734
|
validateAuthorizationCode: ({
|
|
3611
3735
|
code,
|
|
@@ -3645,7 +3769,8 @@ declare const socialProviders: {
|
|
|
3645
3769
|
createAuthorizationURL({
|
|
3646
3770
|
state,
|
|
3647
3771
|
codeVerifier,
|
|
3648
|
-
redirectURI
|
|
3772
|
+
redirectURI,
|
|
3773
|
+
additionalParams
|
|
3649
3774
|
}: {
|
|
3650
3775
|
state: string;
|
|
3651
3776
|
codeVerifier: string;
|
|
@@ -3653,6 +3778,7 @@ declare const socialProviders: {
|
|
|
3653
3778
|
redirectURI: string;
|
|
3654
3779
|
display?: string | undefined;
|
|
3655
3780
|
loginHint?: string | undefined;
|
|
3781
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3656
3782
|
}): Promise<URL>;
|
|
3657
3783
|
validateAuthorizationCode: ({
|
|
3658
3784
|
code,
|
|
@@ -3723,7 +3849,8 @@ declare const socialProviders: {
|
|
|
3723
3849
|
state,
|
|
3724
3850
|
scopes,
|
|
3725
3851
|
codeVerifier,
|
|
3726
|
-
redirectURI
|
|
3852
|
+
redirectURI,
|
|
3853
|
+
additionalParams
|
|
3727
3854
|
}: {
|
|
3728
3855
|
state: string;
|
|
3729
3856
|
codeVerifier: string;
|
|
@@ -3731,6 +3858,7 @@ declare const socialProviders: {
|
|
|
3731
3858
|
redirectURI: string;
|
|
3732
3859
|
display?: string | undefined;
|
|
3733
3860
|
loginHint?: string | undefined;
|
|
3861
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3734
3862
|
}): Promise<URL>;
|
|
3735
3863
|
validateAuthorizationCode: ({
|
|
3736
3864
|
code,
|
|
@@ -3771,7 +3899,8 @@ declare const socialProviders: {
|
|
|
3771
3899
|
state,
|
|
3772
3900
|
scopes,
|
|
3773
3901
|
codeVerifier,
|
|
3774
|
-
redirectURI
|
|
3902
|
+
redirectURI,
|
|
3903
|
+
additionalParams
|
|
3775
3904
|
}: {
|
|
3776
3905
|
state: string;
|
|
3777
3906
|
codeVerifier: string;
|
|
@@ -3779,6 +3908,7 @@ declare const socialProviders: {
|
|
|
3779
3908
|
redirectURI: string;
|
|
3780
3909
|
display?: string | undefined;
|
|
3781
3910
|
loginHint?: string | undefined;
|
|
3911
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3782
3912
|
}): Promise<URL>;
|
|
3783
3913
|
validateAuthorizationCode: ({
|
|
3784
3914
|
code,
|
|
@@ -3819,7 +3949,8 @@ declare const socialProviders: {
|
|
|
3819
3949
|
state,
|
|
3820
3950
|
scopes,
|
|
3821
3951
|
codeVerifier,
|
|
3822
|
-
redirectURI
|
|
3952
|
+
redirectURI,
|
|
3953
|
+
additionalParams
|
|
3823
3954
|
}: {
|
|
3824
3955
|
state: string;
|
|
3825
3956
|
codeVerifier: string;
|
|
@@ -3827,6 +3958,7 @@ declare const socialProviders: {
|
|
|
3827
3958
|
redirectURI: string;
|
|
3828
3959
|
display?: string | undefined;
|
|
3829
3960
|
loginHint?: string | undefined;
|
|
3961
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3830
3962
|
}): Promise<URL>;
|
|
3831
3963
|
validateAuthorizationCode: ({
|
|
3832
3964
|
code,
|
|
@@ -3865,7 +3997,8 @@ declare const socialProviders: {
|
|
|
3865
3997
|
createAuthorizationURL({
|
|
3866
3998
|
state,
|
|
3867
3999
|
scopes,
|
|
3868
|
-
redirectURI
|
|
4000
|
+
redirectURI,
|
|
4001
|
+
additionalParams
|
|
3869
4002
|
}: {
|
|
3870
4003
|
state: string;
|
|
3871
4004
|
codeVerifier: string;
|
|
@@ -3873,6 +4006,7 @@ declare const socialProviders: {
|
|
|
3873
4006
|
redirectURI: string;
|
|
3874
4007
|
display?: string | undefined;
|
|
3875
4008
|
loginHint?: string | undefined;
|
|
4009
|
+
additionalParams?: Record<string, string> | undefined;
|
|
3876
4010
|
}): URL;
|
|
3877
4011
|
validateAuthorizationCode: ({
|
|
3878
4012
|
code
|
|
@@ -4838,8 +4972,20 @@ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions
|
|
|
4838
4972
|
updateSession(sessionToken: string, session: Partial<Session> & Record<string, any>): Promise<Session | null>;
|
|
4839
4973
|
deleteSession(token: string): Promise<void>;
|
|
4840
4974
|
deleteAccounts(userId: string): Promise<void>;
|
|
4841
|
-
|
|
4842
|
-
|
|
4975
|
+
/**
|
|
4976
|
+
* Delete an account by its primary key.
|
|
4977
|
+
*
|
|
4978
|
+
* @param id - The account row's primary key (the `id` column, not the `accountId` column).
|
|
4979
|
+
*/
|
|
4980
|
+
deleteAccount(id: string): Promise<void>;
|
|
4981
|
+
/**
|
|
4982
|
+
* Delete every session belonging to a user.
|
|
4983
|
+
*/
|
|
4984
|
+
deleteUserSessions(userId: string): Promise<void>;
|
|
4985
|
+
/**
|
|
4986
|
+
* Delete sessions by their session tokens.
|
|
4987
|
+
*/
|
|
4988
|
+
deleteSessions(sessionTokens: string[]): Promise<void>;
|
|
4843
4989
|
findOAuthUser(email: string, accountId: string, providerId: string): Promise<{
|
|
4844
4990
|
user: User;
|
|
4845
4991
|
linkedAccount: Account | null;
|
|
@@ -4857,14 +5003,28 @@ interface InternalAdapter<_Options extends BetterAuthOptions = BetterAuthOptions
|
|
|
4857
5003
|
updateUserByEmail<T extends Record<string, any>>(email: string, data: Partial<User & Record<string, any>>): Promise<User & T>;
|
|
4858
5004
|
updatePassword(userId: string, password: string): Promise<void>;
|
|
4859
5005
|
findAccounts(userId: string): Promise<Account[]>;
|
|
4860
|
-
findAccount(accountId: string): Promise<Account | null>;
|
|
4861
5006
|
findAccountByProviderId(accountId: string, providerId: string): Promise<Account | null>;
|
|
4862
5007
|
findAccountByUserId(userId: string): Promise<Account[]>;
|
|
4863
5008
|
updateAccount(id: string, data: Partial<Account>): Promise<Account>;
|
|
4864
5009
|
createVerificationValue(data: Omit<Verification, "createdAt" | "id" | "updatedAt"> & Partial<Verification>): Promise<Verification>;
|
|
4865
5010
|
findVerificationValue(identifier: string): Promise<Verification | null>;
|
|
4866
5011
|
deleteVerificationByIdentifier(identifier: string): Promise<void>;
|
|
5012
|
+
/**
|
|
5013
|
+
* Atomically consume a single-use verification row by `identifier` and
|
|
5014
|
+
* return it. Only the first concurrent caller receives the latest row;
|
|
5015
|
+
* subsequent callers receive `null`. Consuming one row invalidates the
|
|
5016
|
+
* whole identifier so stale rows cannot be replayed. Rows past their
|
|
5017
|
+
* `expiresAt` are treated as already invalid: the row is deleted but
|
|
5018
|
+
* `null` is returned, so callers do not need to gate on `expiresAt`
|
|
5019
|
+
* themselves. Callers MUST gate any state change (issue session, mint
|
|
5020
|
+
* token, change password) on a non-null result.
|
|
5021
|
+
*
|
|
5022
|
+
* Replaces the racy `findVerificationValue` + `deleteVerificationByIdentifier`
|
|
5023
|
+
* pair at single-use credential consumption sites.
|
|
5024
|
+
*/
|
|
5025
|
+
consumeVerificationValue(identifier: string): Promise<Verification | null>;
|
|
4867
5026
|
updateVerificationByIdentifier(identifier: string, data: Partial<Verification>): Promise<Verification>;
|
|
5027
|
+
refreshUserSessions(user: User): Promise<void>;
|
|
4868
5028
|
}
|
|
4869
5029
|
type CreateCookieGetterFn = (cookieName: string, overrideAttributes?: Partial<CookieOptions> | undefined) => BetterAuthCookie;
|
|
4870
5030
|
type CheckPasswordFn<Options extends BetterAuthOptions = BetterAuthOptions> = (userId: string, ctx: GenericEndpointContext<Options>) => Promise<boolean>;
|
|
@@ -4920,7 +5080,7 @@ type AuthContext<Options extends BetterAuthOptions = BetterAuthOptions> = Plugin
|
|
|
4920
5080
|
* - "cookie": Store state in an encrypted cookie (stateless)
|
|
4921
5081
|
* - "database": Store state in the database
|
|
4922
5082
|
*
|
|
4923
|
-
* @default "cookie"
|
|
5083
|
+
* @default "database" when `database` or `secondaryStorage` is configured, "cookie" otherwise
|
|
4924
5084
|
*/
|
|
4925
5085
|
storeStateStrategy: "database" | "cookie";
|
|
4926
5086
|
};
|
|
@@ -5433,12 +5593,13 @@ type BetterAuthAdvancedOptions = {
|
|
|
5433
5593
|
*/
|
|
5434
5594
|
disableIpTracking?: boolean;
|
|
5435
5595
|
/**
|
|
5436
|
-
* IPv6
|
|
5437
|
-
*
|
|
5596
|
+
* IPv6 prefix length used to collapse addresses before rate-limit keying.
|
|
5597
|
+
* Any integer from 0 to 128 is accepted; common values are 32, 48, 56, 64, 128.
|
|
5598
|
+
* Out-of-range values fall back to safe behavior (negative -> mask all, > 128 -> no mask).
|
|
5438
5599
|
*
|
|
5439
5600
|
* @default 64
|
|
5440
5601
|
*/
|
|
5441
|
-
ipv6Subnet?:
|
|
5602
|
+
ipv6Subnet?: number;
|
|
5442
5603
|
} | undefined;
|
|
5443
5604
|
/**
|
|
5444
5605
|
* Force cookies to always use the `Secure` attribute. By default,
|
|
@@ -6187,6 +6348,25 @@ type BetterAuthOptions = {
|
|
|
6187
6348
|
* @default false
|
|
6188
6349
|
*/
|
|
6189
6350
|
disableImplicitLinking?: boolean;
|
|
6351
|
+
/**
|
|
6352
|
+
* Require the existing local user row to have
|
|
6353
|
+
* `emailVerified: true` before implicit account linking
|
|
6354
|
+
* uses the IdP's `email_verified` claim as ownership
|
|
6355
|
+
* proof. Defaults to `true` so an attacker who
|
|
6356
|
+
* pre-registers an unverified account at a victim's
|
|
6357
|
+
* email cannot have the victim's OAuth identity linked
|
|
6358
|
+
* into the attacker-owned row on first sign-in. Set to
|
|
6359
|
+
* `false` for backward compatibility on apps whose
|
|
6360
|
+
* users sign up via OAuth without verifying their email
|
|
6361
|
+
* locally; understand the takeover risk before doing
|
|
6362
|
+
* so.
|
|
6363
|
+
*
|
|
6364
|
+
* @default true
|
|
6365
|
+
*
|
|
6366
|
+
* @deprecated The option will be removed on the next
|
|
6367
|
+
* minor; the gate will become unconditional.
|
|
6368
|
+
*/
|
|
6369
|
+
requireLocalEmailVerified?: boolean;
|
|
6190
6370
|
/**
|
|
6191
6371
|
* List of trusted providers. Can be a static array or a function
|
|
6192
6372
|
* that returns providers dynamically. The function is called
|
|
@@ -6224,7 +6404,11 @@ type BetterAuthOptions = {
|
|
|
6224
6404
|
*/
|
|
6225
6405
|
allowUnlinkingAll?: boolean;
|
|
6226
6406
|
/**
|
|
6227
|
-
*
|
|
6407
|
+
* When enabled, linking an account copies the provider's profile onto
|
|
6408
|
+
* the local user, matching the fields persisted on sign-up (`name`,
|
|
6409
|
+
* `image`, and any `mapProfileToUser` fields). The local `email` and
|
|
6410
|
+
* `emailVerified` are never changed, so a link cannot rebind the
|
|
6411
|
+
* account's identity.
|
|
6228
6412
|
*
|
|
6229
6413
|
* @default false
|
|
6230
6414
|
*/
|
|
@@ -6257,7 +6441,7 @@ type BetterAuthOptions = {
|
|
|
6257
6441
|
* - "cookie": Store state in an encrypted cookie (stateless)
|
|
6258
6442
|
* - "database": Store state in the database
|
|
6259
6443
|
*
|
|
6260
|
-
* @default "cookie"
|
|
6444
|
+
* @default "database" when `database` or `secondaryStorage` is configured, "cookie" otherwise
|
|
6261
6445
|
*/
|
|
6262
6446
|
storeStateStrategy?: "database" | "cookie";
|
|
6263
6447
|
/**
|
|
@@ -6766,6 +6950,18 @@ interface SecondaryStorage {
|
|
|
6766
6950
|
* @returns - Value of the key
|
|
6767
6951
|
*/
|
|
6768
6952
|
get: (key: string) => Awaitable<unknown>;
|
|
6953
|
+
/**
|
|
6954
|
+
* Atomically get a value and delete it from storage.
|
|
6955
|
+
*
|
|
6956
|
+
* This is optional for backwards compatibility with existing secondary
|
|
6957
|
+
* storage implementations. Single-use credential consumers use it when
|
|
6958
|
+
* present to avoid a read-then-delete race.
|
|
6959
|
+
*
|
|
6960
|
+
* TODO(secondary-storage-atomic-consume): make this required in the next
|
|
6961
|
+
* breaking release, or require database-backed verification storage for
|
|
6962
|
+
* security-sensitive consume paths.
|
|
6963
|
+
*/
|
|
6964
|
+
getAndDelete?: (key: string) => Awaitable<unknown>;
|
|
6769
6965
|
set: (
|
|
6770
6966
|
/**
|
|
6771
6967
|
* Key to store
|
|
@@ -7063,6 +7259,7 @@ declare const requestAuthOptionsSchema: z.ZodObject<{
|
|
|
7063
7259
|
disableRedirect: z.ZodOptional<z.ZodBoolean>;
|
|
7064
7260
|
scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
7065
7261
|
requestSignUp: z.ZodOptional<z.ZodBoolean>;
|
|
7262
|
+
additionalParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
7066
7263
|
additionalData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
7067
7264
|
}, z.core.$strip>;
|
|
7068
7265
|
type ElectronRequestAuthOptions = z.infer<typeof requestAuthOptionsSchema>;
|
package/dist/proxy.d.mts
CHANGED
package/dist/proxy.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as PACKAGE_VERSION } from "./version-
|
|
1
|
+
import { t as PACKAGE_VERSION } from "./version-5EiO_U3Z.mjs";
|
|
2
2
|
import { r as parseProtocolScheme } from "./utils-DxDKRT6e.mjs";
|
|
3
3
|
import { parseCookies } from "better-auth/cookies";
|
|
4
4
|
//#region src/proxy.ts
|
package/dist/storage.d.mts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@better-auth/electron",
|
|
3
|
-
"version": "1.7.0-beta.
|
|
3
|
+
"version": "1.7.0-beta.4",
|
|
4
4
|
"description": "Better Auth integration for Electron applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
"better-sqlite3": "^12.6.2",
|
|
81
81
|
"electron": "^41.2.2",
|
|
82
82
|
"tsdown": "0.21.1",
|
|
83
|
-
"@better-auth/core": "1.7.0-beta.
|
|
84
|
-
"better-auth": "1.7.0-beta.
|
|
83
|
+
"@better-auth/core": "1.7.0-beta.4",
|
|
84
|
+
"better-auth": "1.7.0-beta.4"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@better-auth/utils": "0.4.
|
|
87
|
+
"@better-auth/utils": "0.4.1",
|
|
88
88
|
"@better-fetch/fetch": "1.1.21",
|
|
89
89
|
"better-call": "1.3.5",
|
|
90
90
|
"conf": "^15.0.2",
|
|
91
91
|
"electron": ">=36.0.0",
|
|
92
|
-
"@better-auth/core": "^1.7.0-beta.
|
|
93
|
-
"better-auth": "^1.7.0-beta.
|
|
92
|
+
"@better-auth/core": "^1.7.0-beta.4",
|
|
93
|
+
"better-auth": "^1.7.0-beta.4"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
96
96
|
"electron": {
|