@better-auth/electron 1.7.0-beta.6 → 1.7.0-beta.7
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.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/preload.d.mts +106 -2
- package/dist/proxy.mjs +1 -1
- package/dist/{version-BTlyLl-N.mjs → version-DQW8cveo.mjs} +1 -1
- package/package.json +5 -5
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-DQW8cveo.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";
|
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-DQW8cveo.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
|
@@ -756,6 +756,17 @@ type OAuth2UserInfo = {
|
|
|
756
756
|
image?: string | undefined;
|
|
757
757
|
emailVerified: boolean;
|
|
758
758
|
};
|
|
759
|
+
/**
|
|
760
|
+
* Request metadata available to provider refresh hooks.
|
|
761
|
+
*
|
|
762
|
+
* The refresh flow may be triggered by endpoints such as `getAccessToken` or
|
|
763
|
+
* `refreshToken`; this context gives provider hooks access to the triggering
|
|
764
|
+
* request without exposing the full endpoint implementation surface.
|
|
765
|
+
*/
|
|
766
|
+
interface OAuthRefreshContext {
|
|
767
|
+
headers?: Headers | undefined;
|
|
768
|
+
request?: Request | undefined;
|
|
769
|
+
}
|
|
759
770
|
/**
|
|
760
771
|
* The result of building a provider authorization URL.
|
|
761
772
|
*
|
|
@@ -815,6 +826,12 @@ interface UpstreamProvider<T extends Record<string, any> = Record<string, any>,
|
|
|
815
826
|
redirectURI: string;
|
|
816
827
|
display?: string | undefined;
|
|
817
828
|
loginHint?: string | undefined;
|
|
829
|
+
/**
|
|
830
|
+
* OIDC nonce generated by the redirect initiator and persisted in OAuth
|
|
831
|
+
* state. Providers that set `requiresIdTokenNonce` must forward this to
|
|
832
|
+
* the authorization URL as the `nonce` parameter.
|
|
833
|
+
*/
|
|
834
|
+
idTokenNonce?: string | undefined;
|
|
818
835
|
/**
|
|
819
836
|
* Extra query parameters to append to the authorization URL.
|
|
820
837
|
* Providers forward these to the shared `createAuthorizationURL` helper,
|
|
@@ -831,6 +848,12 @@ interface UpstreamProvider<T extends Record<string, any> = Record<string, any>,
|
|
|
831
848
|
deviceId?: string | undefined;
|
|
832
849
|
}) => Promise<OAuth2Tokens | null>;
|
|
833
850
|
getUserInfo: (token: OAuth2Tokens & {
|
|
851
|
+
/**
|
|
852
|
+
* OIDC nonce recovered from OAuth state. Providers that required an
|
|
853
|
+
* ID-token nonce must pass this to `verifyProviderIdToken` before
|
|
854
|
+
* trusting ID-token claims.
|
|
855
|
+
*/
|
|
856
|
+
expectedIdTokenNonce?: string | undefined;
|
|
834
857
|
/**
|
|
835
858
|
* The user object from the provider
|
|
836
859
|
* This is only available for some providers like Apple
|
|
@@ -847,9 +870,13 @@ interface UpstreamProvider<T extends Record<string, any> = Record<string, any>,
|
|
|
847
870
|
data: T;
|
|
848
871
|
} | null>;
|
|
849
872
|
/**
|
|
850
|
-
* Custom function to refresh a token
|
|
873
|
+
* Custom function to refresh a token.
|
|
874
|
+
*
|
|
875
|
+
* Receives request metadata from the endpoint that triggered the refresh.
|
|
876
|
+
* Providers that don't need request-scoped data can ignore the second
|
|
877
|
+
* argument.
|
|
851
878
|
*/
|
|
852
|
-
refreshAccessToken?: ((refreshToken: string) => Promise<OAuth2Tokens>) | undefined;
|
|
879
|
+
refreshAccessToken?: ((refreshToken: string, ctx?: OAuthRefreshContext) => Promise<OAuth2Tokens>) | undefined;
|
|
853
880
|
/**
|
|
854
881
|
* Declarative id_token verification config consumed by the shared
|
|
855
882
|
* `verifyProviderIdToken` verifier. Providers set this instead of implementing a boolean
|
|
@@ -862,6 +889,13 @@ interface UpstreamProvider<T extends Record<string, any> = Record<string, any>,
|
|
|
862
889
|
* against this value to prevent authorization server mix-up attacks.
|
|
863
890
|
*/
|
|
864
891
|
issuer?: string | undefined;
|
|
892
|
+
/**
|
|
893
|
+
* Require shared OAuth redirect routes to bind ID-token verification to an
|
|
894
|
+
* authorization request nonce. When true, routes generate `idTokenNonce`,
|
|
895
|
+
* pass it to `createAuthorizationURL`, persist it in state, and provide it
|
|
896
|
+
* back to `getUserInfo` as `expectedIdTokenNonce`.
|
|
897
|
+
*/
|
|
898
|
+
requiresIdTokenNonce?: boolean | undefined;
|
|
865
899
|
/**
|
|
866
900
|
* Disable implicit sign up for new users. When set to true for the provider,
|
|
867
901
|
* sign-in need to be called with with requestSignUp as true to create new users.
|
|
@@ -2409,6 +2443,7 @@ declare const socialProviders: {
|
|
|
2409
2443
|
redirectURI: string;
|
|
2410
2444
|
display?: string | undefined;
|
|
2411
2445
|
loginHint?: string | undefined;
|
|
2446
|
+
idTokenNonce?: string | undefined;
|
|
2412
2447
|
additionalParams?: Record<string, string> | undefined;
|
|
2413
2448
|
}): Promise<{
|
|
2414
2449
|
url: URL;
|
|
@@ -2433,6 +2468,7 @@ declare const socialProviders: {
|
|
|
2433
2468
|
};
|
|
2434
2469
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2435
2470
|
getUserInfo(token: OAuth2Tokens & {
|
|
2471
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2436
2472
|
user?: {
|
|
2437
2473
|
name?: {
|
|
2438
2474
|
firstName?: string;
|
|
@@ -2470,6 +2506,7 @@ declare const socialProviders: {
|
|
|
2470
2506
|
redirectURI: string;
|
|
2471
2507
|
display?: string | undefined;
|
|
2472
2508
|
loginHint?: string | undefined;
|
|
2509
|
+
idTokenNonce?: string | undefined;
|
|
2473
2510
|
additionalParams?: Record<string, string> | undefined;
|
|
2474
2511
|
}): Promise<{
|
|
2475
2512
|
url: URL;
|
|
@@ -2487,6 +2524,7 @@ declare const socialProviders: {
|
|
|
2487
2524
|
}) => Promise<OAuth2Tokens>;
|
|
2488
2525
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2489
2526
|
getUserInfo(token: OAuth2Tokens & {
|
|
2527
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2490
2528
|
user?: {
|
|
2491
2529
|
name?: {
|
|
2492
2530
|
firstName?: string;
|
|
@@ -2524,6 +2562,7 @@ declare const socialProviders: {
|
|
|
2524
2562
|
redirectURI: string;
|
|
2525
2563
|
display?: string | undefined;
|
|
2526
2564
|
loginHint?: string | undefined;
|
|
2565
|
+
idTokenNonce?: string | undefined;
|
|
2527
2566
|
additionalParams?: Record<string, string> | undefined;
|
|
2528
2567
|
}): Promise<{
|
|
2529
2568
|
url: URL;
|
|
@@ -2547,6 +2586,7 @@ declare const socialProviders: {
|
|
|
2547
2586
|
maxTokenAge: string;
|
|
2548
2587
|
};
|
|
2549
2588
|
getUserInfo(token: OAuth2Tokens & {
|
|
2589
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2550
2590
|
user?: {
|
|
2551
2591
|
name?: {
|
|
2552
2592
|
firstName?: string;
|
|
@@ -2583,6 +2623,7 @@ declare const socialProviders: {
|
|
|
2583
2623
|
redirectURI: string;
|
|
2584
2624
|
display?: string | undefined;
|
|
2585
2625
|
loginHint?: string | undefined;
|
|
2626
|
+
idTokenNonce?: string | undefined;
|
|
2586
2627
|
additionalParams?: Record<string, string> | undefined;
|
|
2587
2628
|
}): Promise<{
|
|
2588
2629
|
url: URL;
|
|
@@ -2599,6 +2640,7 @@ declare const socialProviders: {
|
|
|
2599
2640
|
}) => Promise<OAuth2Tokens>;
|
|
2600
2641
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2601
2642
|
getUserInfo(token: OAuth2Tokens & {
|
|
2643
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2602
2644
|
user?: {
|
|
2603
2645
|
name?: {
|
|
2604
2646
|
firstName?: string;
|
|
@@ -2636,6 +2678,7 @@ declare const socialProviders: {
|
|
|
2636
2678
|
redirectURI: string;
|
|
2637
2679
|
display?: string | undefined;
|
|
2638
2680
|
loginHint?: string | undefined;
|
|
2681
|
+
idTokenNonce?: string | undefined;
|
|
2639
2682
|
additionalParams?: Record<string, string> | undefined;
|
|
2640
2683
|
}): Promise<{
|
|
2641
2684
|
url: URL;
|
|
@@ -2666,6 +2709,7 @@ declare const socialProviders: {
|
|
|
2666
2709
|
};
|
|
2667
2710
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2668
2711
|
getUserInfo(token: OAuth2Tokens & {
|
|
2712
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2669
2713
|
user?: {
|
|
2670
2714
|
name?: {
|
|
2671
2715
|
firstName?: string;
|
|
@@ -2703,6 +2747,7 @@ declare const socialProviders: {
|
|
|
2703
2747
|
redirectURI: string;
|
|
2704
2748
|
display?: string | undefined;
|
|
2705
2749
|
loginHint?: string | undefined;
|
|
2750
|
+
idTokenNonce?: string | undefined;
|
|
2706
2751
|
additionalParams?: Record<string, string> | undefined;
|
|
2707
2752
|
}): Promise<{
|
|
2708
2753
|
url: URL;
|
|
@@ -2720,6 +2765,7 @@ declare const socialProviders: {
|
|
|
2720
2765
|
}) => Promise<OAuth2Tokens>;
|
|
2721
2766
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2722
2767
|
getUserInfo(token: OAuth2Tokens & {
|
|
2768
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2723
2769
|
user?: {
|
|
2724
2770
|
name?: {
|
|
2725
2771
|
firstName?: string;
|
|
@@ -2758,6 +2804,7 @@ declare const socialProviders: {
|
|
|
2758
2804
|
redirectURI: string;
|
|
2759
2805
|
display?: string | undefined;
|
|
2760
2806
|
loginHint?: string | undefined;
|
|
2807
|
+
idTokenNonce?: string | undefined;
|
|
2761
2808
|
additionalParams?: Record<string, string> | undefined;
|
|
2762
2809
|
}): Promise<{
|
|
2763
2810
|
url: URL;
|
|
@@ -2775,6 +2822,7 @@ declare const socialProviders: {
|
|
|
2775
2822
|
}) => Promise<OAuth2Tokens | null>;
|
|
2776
2823
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2777
2824
|
getUserInfo(token: OAuth2Tokens & {
|
|
2825
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2778
2826
|
user?: {
|
|
2779
2827
|
name?: {
|
|
2780
2828
|
firstName?: string;
|
|
@@ -2806,6 +2854,7 @@ declare const socialProviders: {
|
|
|
2806
2854
|
redirectURI: string;
|
|
2807
2855
|
display?: string | undefined;
|
|
2808
2856
|
loginHint?: string | undefined;
|
|
2857
|
+
idTokenNonce?: string | undefined;
|
|
2809
2858
|
additionalParams?: Record<string, string> | undefined;
|
|
2810
2859
|
}): Promise<{
|
|
2811
2860
|
url: URL;
|
|
@@ -2829,6 +2878,7 @@ declare const socialProviders: {
|
|
|
2829
2878
|
verifyClaims: (claims: Record<string, unknown>) => boolean;
|
|
2830
2879
|
};
|
|
2831
2880
|
getUserInfo(token: OAuth2Tokens & {
|
|
2881
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2832
2882
|
user?: {
|
|
2833
2883
|
name?: {
|
|
2834
2884
|
firstName?: string;
|
|
@@ -2870,6 +2920,7 @@ declare const socialProviders: {
|
|
|
2870
2920
|
redirectURI: string;
|
|
2871
2921
|
display?: string | undefined;
|
|
2872
2922
|
loginHint?: string | undefined;
|
|
2923
|
+
idTokenNonce?: string | undefined;
|
|
2873
2924
|
additionalParams?: Record<string, string> | undefined;
|
|
2874
2925
|
}): Promise<{
|
|
2875
2926
|
url: URL;
|
|
@@ -2894,6 +2945,7 @@ declare const socialProviders: {
|
|
|
2894
2945
|
verifyClaims: ((claims: Record<string, unknown>) => boolean) | undefined;
|
|
2895
2946
|
};
|
|
2896
2947
|
getUserInfo(token: OAuth2Tokens & {
|
|
2948
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2897
2949
|
user?: {
|
|
2898
2950
|
name?: {
|
|
2899
2951
|
firstName?: string;
|
|
@@ -2931,6 +2983,7 @@ declare const socialProviders: {
|
|
|
2931
2983
|
redirectURI: string;
|
|
2932
2984
|
display?: string | undefined;
|
|
2933
2985
|
loginHint?: string | undefined;
|
|
2986
|
+
idTokenNonce?: string | undefined;
|
|
2934
2987
|
additionalParams?: Record<string, string> | undefined;
|
|
2935
2988
|
}): Promise<{
|
|
2936
2989
|
url: URL;
|
|
@@ -2948,6 +3001,7 @@ declare const socialProviders: {
|
|
|
2948
3001
|
}) => Promise<OAuth2Tokens>;
|
|
2949
3002
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
2950
3003
|
getUserInfo(token: OAuth2Tokens & {
|
|
3004
|
+
expectedIdTokenNonce?: string | undefined;
|
|
2951
3005
|
user?: {
|
|
2952
3006
|
name?: {
|
|
2953
3007
|
firstName?: string;
|
|
@@ -2984,6 +3038,7 @@ declare const socialProviders: {
|
|
|
2984
3038
|
redirectURI: string;
|
|
2985
3039
|
display?: string | undefined;
|
|
2986
3040
|
loginHint?: string | undefined;
|
|
3041
|
+
idTokenNonce?: string | undefined;
|
|
2987
3042
|
additionalParams?: Record<string, string> | undefined;
|
|
2988
3043
|
}): Promise<{
|
|
2989
3044
|
url: URL;
|
|
@@ -3000,6 +3055,7 @@ declare const socialProviders: {
|
|
|
3000
3055
|
}) => Promise<OAuth2Tokens>;
|
|
3001
3056
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3002
3057
|
getUserInfo(token: OAuth2Tokens & {
|
|
3058
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3003
3059
|
user?: {
|
|
3004
3060
|
name?: {
|
|
3005
3061
|
firstName?: string;
|
|
@@ -3037,6 +3093,7 @@ declare const socialProviders: {
|
|
|
3037
3093
|
redirectURI: string;
|
|
3038
3094
|
display?: string | undefined;
|
|
3039
3095
|
loginHint?: string | undefined;
|
|
3096
|
+
idTokenNonce?: string | undefined;
|
|
3040
3097
|
additionalParams?: Record<string, string> | undefined;
|
|
3041
3098
|
}): Promise<{
|
|
3042
3099
|
url: URL;
|
|
@@ -3054,6 +3111,7 @@ declare const socialProviders: {
|
|
|
3054
3111
|
}) => Promise<OAuth2Tokens>;
|
|
3055
3112
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3056
3113
|
getUserInfo(token: OAuth2Tokens & {
|
|
3114
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3057
3115
|
user?: {
|
|
3058
3116
|
name?: {
|
|
3059
3117
|
firstName?: string;
|
|
@@ -3090,6 +3148,7 @@ declare const socialProviders: {
|
|
|
3090
3148
|
redirectURI: string;
|
|
3091
3149
|
display?: string | undefined;
|
|
3092
3150
|
loginHint?: string | undefined;
|
|
3151
|
+
idTokenNonce?: string | undefined;
|
|
3093
3152
|
additionalParams?: Record<string, string> | undefined;
|
|
3094
3153
|
}): Promise<{
|
|
3095
3154
|
url: URL;
|
|
@@ -3106,6 +3165,7 @@ declare const socialProviders: {
|
|
|
3106
3165
|
}) => Promise<OAuth2Tokens>;
|
|
3107
3166
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3108
3167
|
getUserInfo(token: OAuth2Tokens & {
|
|
3168
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3109
3169
|
user?: {
|
|
3110
3170
|
name?: {
|
|
3111
3171
|
firstName?: string;
|
|
@@ -3137,6 +3197,7 @@ declare const socialProviders: {
|
|
|
3137
3197
|
redirectURI: string;
|
|
3138
3198
|
display?: string | undefined;
|
|
3139
3199
|
loginHint?: string | undefined;
|
|
3200
|
+
idTokenNonce?: string | undefined;
|
|
3140
3201
|
additionalParams?: Record<string, string> | undefined;
|
|
3141
3202
|
}): Promise<{
|
|
3142
3203
|
url: URL;
|
|
@@ -3154,6 +3215,7 @@ declare const socialProviders: {
|
|
|
3154
3215
|
}) => Promise<OAuth2Tokens>;
|
|
3155
3216
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3156
3217
|
getUserInfo(token: OAuth2Tokens & {
|
|
3218
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3157
3219
|
user?: {
|
|
3158
3220
|
name?: {
|
|
3159
3221
|
firstName?: string;
|
|
@@ -3191,6 +3253,7 @@ declare const socialProviders: {
|
|
|
3191
3253
|
redirectURI: string;
|
|
3192
3254
|
display?: string | undefined;
|
|
3193
3255
|
loginHint?: string | undefined;
|
|
3256
|
+
idTokenNonce?: string | undefined;
|
|
3194
3257
|
additionalParams?: Record<string, string> | undefined;
|
|
3195
3258
|
}) => Promise<{
|
|
3196
3259
|
url: URL;
|
|
@@ -3208,6 +3271,7 @@ declare const socialProviders: {
|
|
|
3208
3271
|
}) => Promise<OAuth2Tokens>;
|
|
3209
3272
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3210
3273
|
getUserInfo(token: OAuth2Tokens & {
|
|
3274
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3211
3275
|
user?: {
|
|
3212
3276
|
name?: {
|
|
3213
3277
|
firstName?: string;
|
|
@@ -3245,6 +3309,7 @@ declare const socialProviders: {
|
|
|
3245
3309
|
redirectURI: string;
|
|
3246
3310
|
display?: string | undefined;
|
|
3247
3311
|
loginHint?: string | undefined;
|
|
3312
|
+
idTokenNonce?: string | undefined;
|
|
3248
3313
|
additionalParams?: Record<string, string> | undefined;
|
|
3249
3314
|
}): Promise<{
|
|
3250
3315
|
url: URL;
|
|
@@ -3262,6 +3327,7 @@ declare const socialProviders: {
|
|
|
3262
3327
|
}): Promise<OAuth2Tokens>;
|
|
3263
3328
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3264
3329
|
getUserInfo(token: OAuth2Tokens & {
|
|
3330
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3265
3331
|
user?: {
|
|
3266
3332
|
name?: {
|
|
3267
3333
|
firstName?: string;
|
|
@@ -3299,6 +3365,7 @@ declare const socialProviders: {
|
|
|
3299
3365
|
redirectURI: string;
|
|
3300
3366
|
display?: string | undefined;
|
|
3301
3367
|
loginHint?: string | undefined;
|
|
3368
|
+
idTokenNonce?: string | undefined;
|
|
3302
3369
|
additionalParams?: Record<string, string> | undefined;
|
|
3303
3370
|
}): Promise<{
|
|
3304
3371
|
url: URL;
|
|
@@ -3315,6 +3382,7 @@ declare const socialProviders: {
|
|
|
3315
3382
|
}) => Promise<OAuth2Tokens>;
|
|
3316
3383
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3317
3384
|
getUserInfo(token: OAuth2Tokens & {
|
|
3385
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3318
3386
|
user?: {
|
|
3319
3387
|
name?: {
|
|
3320
3388
|
firstName?: string;
|
|
@@ -3352,6 +3420,7 @@ declare const socialProviders: {
|
|
|
3352
3420
|
redirectURI: string;
|
|
3353
3421
|
display?: string | undefined;
|
|
3354
3422
|
loginHint?: string | undefined;
|
|
3423
|
+
idTokenNonce?: string | undefined;
|
|
3355
3424
|
additionalParams?: Record<string, string> | undefined;
|
|
3356
3425
|
}) => Promise<{
|
|
3357
3426
|
url: URL;
|
|
@@ -3368,6 +3437,7 @@ declare const socialProviders: {
|
|
|
3368
3437
|
}) => Promise<OAuth2Tokens>;
|
|
3369
3438
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3370
3439
|
getUserInfo(token: OAuth2Tokens & {
|
|
3440
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3371
3441
|
user?: {
|
|
3372
3442
|
name?: {
|
|
3373
3443
|
firstName?: string;
|
|
@@ -3406,6 +3476,7 @@ declare const socialProviders: {
|
|
|
3406
3476
|
redirectURI: string;
|
|
3407
3477
|
display?: string | undefined;
|
|
3408
3478
|
loginHint?: string | undefined;
|
|
3479
|
+
idTokenNonce?: string | undefined;
|
|
3409
3480
|
additionalParams?: Record<string, string> | undefined;
|
|
3410
3481
|
}) => Promise<{
|
|
3411
3482
|
url: URL;
|
|
@@ -3423,6 +3494,7 @@ declare const socialProviders: {
|
|
|
3423
3494
|
}) => Promise<OAuth2Tokens>;
|
|
3424
3495
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3425
3496
|
getUserInfo(token: OAuth2Tokens & {
|
|
3497
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3426
3498
|
user?: {
|
|
3427
3499
|
name?: {
|
|
3428
3500
|
firstName?: string;
|
|
@@ -3480,6 +3552,7 @@ declare const socialProviders: {
|
|
|
3480
3552
|
redirectURI: string;
|
|
3481
3553
|
display?: string | undefined;
|
|
3482
3554
|
loginHint?: string | undefined;
|
|
3555
|
+
idTokenNonce?: string | undefined;
|
|
3483
3556
|
additionalParams?: Record<string, string> | undefined;
|
|
3484
3557
|
}): {
|
|
3485
3558
|
url: URL;
|
|
@@ -3496,6 +3569,7 @@ declare const socialProviders: {
|
|
|
3496
3569
|
}) => Promise<OAuth2Tokens>;
|
|
3497
3570
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3498
3571
|
getUserInfo(token: OAuth2Tokens & {
|
|
3572
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3499
3573
|
user?: {
|
|
3500
3574
|
name?: {
|
|
3501
3575
|
firstName?: string;
|
|
@@ -3532,6 +3606,7 @@ declare const socialProviders: {
|
|
|
3532
3606
|
redirectURI: string;
|
|
3533
3607
|
display?: string | undefined;
|
|
3534
3608
|
loginHint?: string | undefined;
|
|
3609
|
+
idTokenNonce?: string | undefined;
|
|
3535
3610
|
additionalParams?: Record<string, string> | undefined;
|
|
3536
3611
|
}): Promise<{
|
|
3537
3612
|
url: URL;
|
|
@@ -3548,6 +3623,7 @@ declare const socialProviders: {
|
|
|
3548
3623
|
}) => Promise<OAuth2Tokens>;
|
|
3549
3624
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3550
3625
|
getUserInfo(token: OAuth2Tokens & {
|
|
3626
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3551
3627
|
user?: {
|
|
3552
3628
|
name?: {
|
|
3553
3629
|
firstName?: string;
|
|
@@ -3584,6 +3660,7 @@ declare const socialProviders: {
|
|
|
3584
3660
|
redirectURI: string;
|
|
3585
3661
|
display?: string | undefined;
|
|
3586
3662
|
loginHint?: string | undefined;
|
|
3663
|
+
idTokenNonce?: string | undefined;
|
|
3587
3664
|
additionalParams?: Record<string, string> | undefined;
|
|
3588
3665
|
}): Promise<{
|
|
3589
3666
|
url: URL;
|
|
@@ -3600,6 +3677,7 @@ declare const socialProviders: {
|
|
|
3600
3677
|
}) => Promise<OAuth2Tokens>;
|
|
3601
3678
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3602
3679
|
getUserInfo(token: OAuth2Tokens & {
|
|
3680
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3603
3681
|
user?: {
|
|
3604
3682
|
name?: {
|
|
3605
3683
|
firstName?: string;
|
|
@@ -3637,6 +3715,7 @@ declare const socialProviders: {
|
|
|
3637
3715
|
redirectURI: string;
|
|
3638
3716
|
display?: string | undefined;
|
|
3639
3717
|
loginHint?: string | undefined;
|
|
3718
|
+
idTokenNonce?: string | undefined;
|
|
3640
3719
|
additionalParams?: Record<string, string> | undefined;
|
|
3641
3720
|
}): Promise<{
|
|
3642
3721
|
url: URL;
|
|
@@ -3654,6 +3733,7 @@ declare const socialProviders: {
|
|
|
3654
3733
|
}) => Promise<OAuth2Tokens>;
|
|
3655
3734
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3656
3735
|
getUserInfo(token: OAuth2Tokens & {
|
|
3736
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3657
3737
|
user?: {
|
|
3658
3738
|
name?: {
|
|
3659
3739
|
firstName?: string;
|
|
@@ -3691,6 +3771,7 @@ declare const socialProviders: {
|
|
|
3691
3771
|
redirectURI: string;
|
|
3692
3772
|
display?: string | undefined;
|
|
3693
3773
|
loginHint?: string | undefined;
|
|
3774
|
+
idTokenNonce?: string | undefined;
|
|
3694
3775
|
additionalParams?: Record<string, string> | undefined;
|
|
3695
3776
|
}): Promise<{
|
|
3696
3777
|
url: URL;
|
|
@@ -3709,6 +3790,7 @@ declare const socialProviders: {
|
|
|
3709
3790
|
}) => Promise<OAuth2Tokens>;
|
|
3710
3791
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3711
3792
|
getUserInfo(data: OAuth2Tokens & {
|
|
3793
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3712
3794
|
user?: {
|
|
3713
3795
|
name?: {
|
|
3714
3796
|
firstName?: string;
|
|
@@ -3746,6 +3828,7 @@ declare const socialProviders: {
|
|
|
3746
3828
|
redirectURI: string;
|
|
3747
3829
|
display?: string | undefined;
|
|
3748
3830
|
loginHint?: string | undefined;
|
|
3831
|
+
idTokenNonce?: string | undefined;
|
|
3749
3832
|
additionalParams?: Record<string, string> | undefined;
|
|
3750
3833
|
}) => Promise<{
|
|
3751
3834
|
url: URL;
|
|
@@ -3763,6 +3846,7 @@ declare const socialProviders: {
|
|
|
3763
3846
|
}) => Promise<OAuth2Tokens>;
|
|
3764
3847
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3765
3848
|
getUserInfo(token: OAuth2Tokens & {
|
|
3849
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3766
3850
|
user?: {
|
|
3767
3851
|
name?: {
|
|
3768
3852
|
firstName?: string;
|
|
@@ -3799,6 +3883,7 @@ declare const socialProviders: {
|
|
|
3799
3883
|
redirectURI: string;
|
|
3800
3884
|
display?: string | undefined;
|
|
3801
3885
|
loginHint?: string | undefined;
|
|
3886
|
+
idTokenNonce?: string | undefined;
|
|
3802
3887
|
additionalParams?: Record<string, string> | undefined;
|
|
3803
3888
|
}): Promise<{
|
|
3804
3889
|
url: URL;
|
|
@@ -3815,6 +3900,7 @@ declare const socialProviders: {
|
|
|
3815
3900
|
}) => Promise<OAuth2Tokens>;
|
|
3816
3901
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3817
3902
|
getUserInfo(token: OAuth2Tokens & {
|
|
3903
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3818
3904
|
user?: {
|
|
3819
3905
|
name?: {
|
|
3820
3906
|
firstName?: string;
|
|
@@ -3851,6 +3937,7 @@ declare const socialProviders: {
|
|
|
3851
3937
|
redirectURI: string;
|
|
3852
3938
|
display?: string | undefined;
|
|
3853
3939
|
loginHint?: string | undefined;
|
|
3940
|
+
idTokenNonce?: string | undefined;
|
|
3854
3941
|
additionalParams?: Record<string, string> | undefined;
|
|
3855
3942
|
}): Promise<{
|
|
3856
3943
|
url: URL;
|
|
@@ -3867,6 +3954,7 @@ declare const socialProviders: {
|
|
|
3867
3954
|
}) => Promise<OAuth2Tokens>;
|
|
3868
3955
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3869
3956
|
getUserInfo(token: OAuth2Tokens & {
|
|
3957
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3870
3958
|
user?: {
|
|
3871
3959
|
name?: {
|
|
3872
3960
|
firstName?: string;
|
|
@@ -3924,6 +4012,7 @@ declare const socialProviders: {
|
|
|
3924
4012
|
redirectURI: string;
|
|
3925
4013
|
display?: string | undefined;
|
|
3926
4014
|
loginHint?: string | undefined;
|
|
4015
|
+
idTokenNonce?: string | undefined;
|
|
3927
4016
|
additionalParams?: Record<string, string> | undefined;
|
|
3928
4017
|
}): Promise<{
|
|
3929
4018
|
url: URL;
|
|
@@ -3940,6 +4029,7 @@ declare const socialProviders: {
|
|
|
3940
4029
|
}) => Promise<OAuth2Tokens>;
|
|
3941
4030
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
3942
4031
|
getUserInfo(token: OAuth2Tokens & {
|
|
4032
|
+
expectedIdTokenNonce?: string | undefined;
|
|
3943
4033
|
user?: {
|
|
3944
4034
|
name?: {
|
|
3945
4035
|
firstName?: string;
|
|
@@ -3999,6 +4089,7 @@ declare const socialProviders: {
|
|
|
3999
4089
|
redirectURI: string;
|
|
4000
4090
|
display?: string | undefined;
|
|
4001
4091
|
loginHint?: string | undefined;
|
|
4092
|
+
idTokenNonce?: string | undefined;
|
|
4002
4093
|
additionalParams?: Record<string, string> | undefined;
|
|
4003
4094
|
}): Promise<{
|
|
4004
4095
|
url: URL;
|
|
@@ -4019,6 +4110,7 @@ declare const socialProviders: {
|
|
|
4019
4110
|
verify: (token: string, nonce: string | undefined) => Promise<boolean>;
|
|
4020
4111
|
};
|
|
4021
4112
|
getUserInfo(token: OAuth2Tokens & {
|
|
4113
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4022
4114
|
user?: {
|
|
4023
4115
|
name?: {
|
|
4024
4116
|
firstName?: string;
|
|
@@ -4078,6 +4170,7 @@ declare const socialProviders: {
|
|
|
4078
4170
|
redirectURI: string;
|
|
4079
4171
|
display?: string | undefined;
|
|
4080
4172
|
loginHint?: string | undefined;
|
|
4173
|
+
idTokenNonce?: string | undefined;
|
|
4081
4174
|
additionalParams?: Record<string, string> | undefined;
|
|
4082
4175
|
}): Promise<{
|
|
4083
4176
|
url: URL;
|
|
@@ -4095,6 +4188,7 @@ declare const socialProviders: {
|
|
|
4095
4188
|
}) => Promise<OAuth2Tokens>;
|
|
4096
4189
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
4097
4190
|
getUserInfo(token: OAuth2Tokens & {
|
|
4191
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4098
4192
|
user?: {
|
|
4099
4193
|
name?: {
|
|
4100
4194
|
firstName?: string;
|
|
@@ -4131,6 +4225,7 @@ declare const socialProviders: {
|
|
|
4131
4225
|
redirectURI: string;
|
|
4132
4226
|
display?: string | undefined;
|
|
4133
4227
|
loginHint?: string | undefined;
|
|
4228
|
+
idTokenNonce?: string | undefined;
|
|
4134
4229
|
additionalParams?: Record<string, string> | undefined;
|
|
4135
4230
|
}): Promise<{
|
|
4136
4231
|
url: URL;
|
|
@@ -4156,6 +4251,7 @@ declare const socialProviders: {
|
|
|
4156
4251
|
accessTokenExpiresAt: Date | undefined;
|
|
4157
4252
|
}>);
|
|
4158
4253
|
getUserInfo(token: OAuth2Tokens & {
|
|
4254
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4159
4255
|
user?: {
|
|
4160
4256
|
name?: {
|
|
4161
4257
|
firstName?: string;
|
|
@@ -4214,6 +4310,7 @@ declare const socialProviders: {
|
|
|
4214
4310
|
redirectURI: string;
|
|
4215
4311
|
display?: string | undefined;
|
|
4216
4312
|
loginHint?: string | undefined;
|
|
4313
|
+
idTokenNonce?: string | undefined;
|
|
4217
4314
|
additionalParams?: Record<string, string> | undefined;
|
|
4218
4315
|
}): Promise<{
|
|
4219
4316
|
url: URL;
|
|
@@ -4231,6 +4328,7 @@ declare const socialProviders: {
|
|
|
4231
4328
|
}) => Promise<OAuth2Tokens>;
|
|
4232
4329
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
4233
4330
|
getUserInfo(token: OAuth2Tokens & {
|
|
4331
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4234
4332
|
user?: {
|
|
4235
4333
|
name?: {
|
|
4236
4334
|
firstName?: string;
|
|
@@ -4268,6 +4366,7 @@ declare const socialProviders: {
|
|
|
4268
4366
|
redirectURI: string;
|
|
4269
4367
|
display?: string | undefined;
|
|
4270
4368
|
loginHint?: string | undefined;
|
|
4369
|
+
idTokenNonce?: string | undefined;
|
|
4271
4370
|
additionalParams?: Record<string, string> | undefined;
|
|
4272
4371
|
}): Promise<{
|
|
4273
4372
|
url: URL;
|
|
@@ -4285,6 +4384,7 @@ declare const socialProviders: {
|
|
|
4285
4384
|
}) => Promise<OAuth2Tokens>;
|
|
4286
4385
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
4287
4386
|
getUserInfo(token: OAuth2Tokens & {
|
|
4387
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4288
4388
|
user?: {
|
|
4289
4389
|
name?: {
|
|
4290
4390
|
firstName?: string;
|
|
@@ -4322,6 +4422,7 @@ declare const socialProviders: {
|
|
|
4322
4422
|
redirectURI: string;
|
|
4323
4423
|
display?: string | undefined;
|
|
4324
4424
|
loginHint?: string | undefined;
|
|
4425
|
+
idTokenNonce?: string | undefined;
|
|
4325
4426
|
additionalParams?: Record<string, string> | undefined;
|
|
4326
4427
|
}): Promise<{
|
|
4327
4428
|
url: URL;
|
|
@@ -4338,6 +4439,7 @@ declare const socialProviders: {
|
|
|
4338
4439
|
deviceId?: string | undefined;
|
|
4339
4440
|
}) => Promise<OAuth2Tokens>;
|
|
4340
4441
|
getUserInfo(token: OAuth2Tokens & {
|
|
4442
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4341
4443
|
user?: {
|
|
4342
4444
|
name?: {
|
|
4343
4445
|
firstName?: string;
|
|
@@ -4374,6 +4476,7 @@ declare const socialProviders: {
|
|
|
4374
4476
|
redirectURI: string;
|
|
4375
4477
|
display?: string | undefined;
|
|
4376
4478
|
loginHint?: string | undefined;
|
|
4479
|
+
idTokenNonce?: string | undefined;
|
|
4377
4480
|
additionalParams?: Record<string, string> | undefined;
|
|
4378
4481
|
}): {
|
|
4379
4482
|
url: URL;
|
|
@@ -4403,6 +4506,7 @@ declare const socialProviders: {
|
|
|
4403
4506
|
scopes: string[];
|
|
4404
4507
|
}>);
|
|
4405
4508
|
getUserInfo(token: OAuth2Tokens & {
|
|
4509
|
+
expectedIdTokenNonce?: string | undefined;
|
|
4406
4510
|
user?: {
|
|
4407
4511
|
name?: {
|
|
4408
4512
|
firstName?: string;
|
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-DQW8cveo.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/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.7",
|
|
4
4
|
"description": "Better Auth integration for Electron applications.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -80,8 +80,8 @@
|
|
|
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.7",
|
|
84
|
+
"better-auth": "1.7.0-beta.7"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@better-auth/utils": "0.4.2",
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"better-call": "1.3.6",
|
|
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.7",
|
|
93
|
+
"better-auth": "^1.7.0-beta.7"
|
|
94
94
|
},
|
|
95
95
|
"peerDependenciesMeta": {
|
|
96
96
|
"electron": {
|