@xylex-group/athena 3.0.0 → 3.0.2
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/README.md +24 -10
- package/dist/{athena-auth-url-oLux_57a.d.cts → athena-request-headers-C7Jy-c_D.d.ts} +85 -1
- package/dist/{athena-auth-url-oLux_57a.d.ts → athena-request-headers-DujFFyMU.d.cts} +85 -1
- package/dist/billing.cjs +133 -21
- package/dist/billing.cjs.map +1 -1
- package/dist/billing.d.cts +41 -1
- package/dist/billing.d.ts +41 -1
- package/dist/billing.js +133 -21
- package/dist/billing.js.map +1 -1
- package/dist/browser.cjs +138 -45
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +9 -9
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +138 -45
- package/dist/browser.js.map +1 -1
- package/dist/cli/index.cjs +130 -45
- package/dist/cli/index.cjs.map +1 -1
- package/dist/cli/index.d.cts +3 -3
- package/dist/cli/index.d.ts +3 -3
- package/dist/cli/index.js +130 -45
- package/dist/cli/index.js.map +1 -1
- package/dist/index.cjs +138 -45
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -9
- package/dist/index.d.ts +9 -9
- package/dist/index.js +138 -45
- package/dist/index.js.map +1 -1
- package/dist/{model-form-BKetpu6Q.d.ts → model-form-Dh0sisdL.d.ts} +1 -1
- package/dist/{model-form-BEfCGB5b.d.cts → model-form-oOAJUVd4.d.cts} +1 -1
- package/dist/{module-CrrSmpML.d.cts → module-CB25egcO.d.cts} +17 -5
- package/dist/{module-8dSMcy0K.d.cts → module-C_ab-MM1.d.cts} +46 -12
- package/dist/{module-8dSMcy0K.d.ts → module-C_ab-MM1.d.ts} +46 -12
- package/dist/{module-Bef_MAPO.d.ts → module-CkUM6v58.d.ts} +17 -5
- package/dist/next/client.cjs +9817 -3
- package/dist/next/client.cjs.map +1 -1
- package/dist/next/client.d.cts +26 -1
- package/dist/next/client.d.ts +26 -1
- package/dist/next/client.js +9788 -4
- package/dist/next/client.js.map +1 -1
- package/dist/next/server.cjs +10398 -42
- package/dist/next/server.cjs.map +1 -1
- package/dist/next/server.d.cts +39 -4
- package/dist/next/server.d.ts +39 -4
- package/dist/next/server.js +10339 -43
- package/dist/next/server.js.map +1 -1
- package/dist/{pipeline-BXFQbsUW.d.ts → pipeline-B8aN2EHe.d.ts} +1 -1
- package/dist/{pipeline-Dfsed4VD.d.cts → pipeline-D4W-Cc-A.d.cts} +1 -1
- package/dist/proxy-request-headers-DGxdoyA0.d.cts +59 -0
- package/dist/proxy-request-headers-m4D2Tduy.d.ts +59 -0
- package/dist/react.cjs +7 -7
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +4 -4
- package/dist/react.d.ts +4 -4
- package/dist/react.js +7 -7
- package/dist/react.js.map +1 -1
- package/dist/social-providers.cjs +15 -11
- package/dist/social-providers.cjs.map +1 -1
- package/dist/social-providers.d.cts +17 -57
- package/dist/social-providers.d.ts +17 -57
- package/dist/social-providers.js +15 -11
- package/dist/social-providers.js.map +1 -1
- package/dist/{types-jClgDy1J.d.ts → types-B75PdABb.d.ts} +1 -1
- package/dist/{types-Z3-rsiM3.d.cts → types-BBm-kEBL.d.cts} +1 -1
- package/dist/{types-CK7cBQbC.d.ts → types-BaAMXCqK.d.ts} +1 -1
- package/dist/{types-kO_Ut5wU.d.cts → types-CgCv5o6R.d.cts} +1 -1
- package/dist/utils.d.cts +4 -142
- package/dist/utils.d.ts +4 -142
- package/dist/{v3-client-G8JMOilK.d.cts → v3-client-CWfZHcKL.d.cts} +37 -21
- package/dist/{v3-client-CuCNy-JJ.d.ts → v3-client-DZp2NEhK.d.ts} +37 -21
- package/package.json +6 -3
|
@@ -132,7 +132,7 @@ type ProviderOptions<Profile extends Record<string, any> = any> = {
|
|
|
132
132
|
* WeChat user profile information
|
|
133
133
|
* @see https://developers.weixin.qq.com/doc/oplatform/en/Website_App/WeChat_Login/Wechat_Login.html
|
|
134
134
|
*/
|
|
135
|
-
interface WeChatProfile extends Record<string,
|
|
135
|
+
interface WeChatProfile extends Record<string, unknown> {
|
|
136
136
|
/**
|
|
137
137
|
* User's unique OpenID
|
|
138
138
|
*/
|
|
@@ -576,27 +576,6 @@ declare const line: (options: LineOptions) => {
|
|
|
576
576
|
[key: string]: any;
|
|
577
577
|
};
|
|
578
578
|
data: any;
|
|
579
|
-
} | {
|
|
580
|
-
user: {
|
|
581
|
-
id: any;
|
|
582
|
-
name: any;
|
|
583
|
-
email: any;
|
|
584
|
-
image: any;
|
|
585
|
-
emailVerified: false;
|
|
586
|
-
} | {
|
|
587
|
-
id: any;
|
|
588
|
-
name: any;
|
|
589
|
-
email: any;
|
|
590
|
-
image: any;
|
|
591
|
-
emailVerified: boolean;
|
|
592
|
-
} | {
|
|
593
|
-
id: any;
|
|
594
|
-
name: any;
|
|
595
|
-
email: any;
|
|
596
|
-
image: any;
|
|
597
|
-
emailVerified: boolean;
|
|
598
|
-
};
|
|
599
|
-
data: any;
|
|
600
579
|
} | null>;
|
|
601
580
|
options: LineOptions;
|
|
602
581
|
};
|
|
@@ -774,7 +753,7 @@ interface KakaoProfile {
|
|
|
774
753
|
/** UTC datetime when the user signed up via Kakao Sync */
|
|
775
754
|
synched_at?: string | undefined;
|
|
776
755
|
/** Custom user properties */
|
|
777
|
-
properties?: Record<string,
|
|
756
|
+
properties?: Record<string, unknown> | undefined;
|
|
778
757
|
/** Kakao account info */
|
|
779
758
|
kakao_account: KakaoAccount;
|
|
780
759
|
/** Partner info */
|
|
@@ -803,7 +782,9 @@ declare const kakao: (options: KakaoOptions) => {
|
|
|
803
782
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
804
783
|
getUserInfo(token: OAuth2Tokens & {
|
|
805
784
|
user?: {
|
|
806
|
-
name
|
|
785
|
+
name
|
|
786
|
+
/** Birth year (YYYY) */
|
|
787
|
+
? /** Birth year (YYYY) */: {
|
|
807
788
|
firstName?: string;
|
|
808
789
|
lastName?: string;
|
|
809
790
|
};
|
|
@@ -931,7 +912,7 @@ interface PhoneNumber {
|
|
|
931
912
|
* See the full documentation below:
|
|
932
913
|
* https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}
|
|
933
914
|
*/
|
|
934
|
-
interface ZoomProfile extends Record<string,
|
|
915
|
+
interface ZoomProfile extends Record<string, unknown> {
|
|
935
916
|
/** The user's account ID (Example: "q6gBJVO5TzexKYTb_I2rpg") */
|
|
936
917
|
account_id: string;
|
|
937
918
|
/** The user's account number (Example: 10009239) */
|
|
@@ -1148,7 +1129,7 @@ declare const salesforce: (options: SalesforceOptions) => {
|
|
|
1148
1129
|
options: SalesforceOptions;
|
|
1149
1130
|
};
|
|
1150
1131
|
|
|
1151
|
-
interface RobloxProfile extends Record<string,
|
|
1132
|
+
interface RobloxProfile extends Record<string, unknown> {
|
|
1152
1133
|
/** the user's id */
|
|
1153
1134
|
sub: string;
|
|
1154
1135
|
/** the user's username */
|
|
@@ -1263,7 +1244,7 @@ declare const reddit: (options: RedditOptions) => {
|
|
|
1263
1244
|
/**
|
|
1264
1245
|
* [More info](https://developers.tiktok.com/doc/tiktok-api-v2-get-user-info/)
|
|
1265
1246
|
*/
|
|
1266
|
-
interface TiktokProfile extends Record<string,
|
|
1247
|
+
interface TiktokProfile extends Record<string, unknown> {
|
|
1267
1248
|
data: {
|
|
1268
1249
|
user: {
|
|
1269
1250
|
/**
|
|
@@ -1419,7 +1400,7 @@ declare const tiktok: (options: TiktokOptions) => {
|
|
|
1419
1400
|
options: TiktokOptions;
|
|
1420
1401
|
};
|
|
1421
1402
|
|
|
1422
|
-
interface GitlabProfile extends Record<string,
|
|
1403
|
+
interface GitlabProfile extends Record<string, unknown> {
|
|
1423
1404
|
id: number;
|
|
1424
1405
|
username: string;
|
|
1425
1406
|
email: string;
|
|
@@ -2011,7 +1992,7 @@ declare const spotify: (options: SpotifyOptions) => {
|
|
|
2011
1992
|
options: SpotifyOptions;
|
|
2012
1993
|
};
|
|
2013
1994
|
|
|
2014
|
-
interface SlackProfile extends Record<string,
|
|
1995
|
+
interface SlackProfile extends Record<string, unknown> {
|
|
2015
1996
|
ok: boolean;
|
|
2016
1997
|
sub: string;
|
|
2017
1998
|
"https://slack.com/user_id": string;
|
|
@@ -2219,7 +2200,7 @@ interface VerifyGoogleIdTokenOptions {
|
|
|
2219
2200
|
* @see https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-reference
|
|
2220
2201
|
*/
|
|
2221
2202
|
declare const MICROSOFT_CONSUMER_TENANT_ID = "9188040d-6c67-4c5b-b112-36a304b66dad";
|
|
2222
|
-
interface MicrosoftEntraIDProfile extends Record<string,
|
|
2203
|
+
interface MicrosoftEntraIDProfile extends Record<string, unknown> {
|
|
2223
2204
|
/** Identifies the intended recipient of the token */
|
|
2224
2205
|
aud: string;
|
|
2225
2206
|
/** Identifies the issuer, or "authorization server" that constructs and returns the token */
|
|
@@ -2515,7 +2496,7 @@ interface FacebookOptions extends ProviderOptions<FacebookProfile> {
|
|
|
2515
2496
|
configId?: string | undefined;
|
|
2516
2497
|
}
|
|
2517
2498
|
|
|
2518
|
-
interface DiscordProfile extends Record<string,
|
|
2499
|
+
interface DiscordProfile extends Record<string, unknown> {
|
|
2519
2500
|
/** the user's id (i.e. the numerical snowflake) */
|
|
2520
2501
|
id: string;
|
|
2521
2502
|
/** the user's username, not unique across the platform */
|
|
@@ -2649,7 +2630,7 @@ interface CognitoProfile {
|
|
|
2649
2630
|
iss: string;
|
|
2650
2631
|
exp: number;
|
|
2651
2632
|
iat: number;
|
|
2652
|
-
[key: string]:
|
|
2633
|
+
[key: string]: unknown;
|
|
2653
2634
|
}
|
|
2654
2635
|
interface CognitoOptions extends ProviderOptions<CognitoProfile> {
|
|
2655
2636
|
clientId: string | string[];
|
|
@@ -4145,27 +4126,6 @@ declare const socialProviders: {
|
|
|
4145
4126
|
[key: string]: any;
|
|
4146
4127
|
};
|
|
4147
4128
|
data: any;
|
|
4148
|
-
} | {
|
|
4149
|
-
user: {
|
|
4150
|
-
id: any;
|
|
4151
|
-
name: any;
|
|
4152
|
-
email: any;
|
|
4153
|
-
image: any;
|
|
4154
|
-
emailVerified: false;
|
|
4155
|
-
} | {
|
|
4156
|
-
id: any;
|
|
4157
|
-
name: any;
|
|
4158
|
-
email: any;
|
|
4159
|
-
image: any;
|
|
4160
|
-
emailVerified: boolean;
|
|
4161
|
-
} | {
|
|
4162
|
-
id: any;
|
|
4163
|
-
name: any;
|
|
4164
|
-
email: any;
|
|
4165
|
-
image: any;
|
|
4166
|
-
emailVerified: boolean;
|
|
4167
|
-
};
|
|
4168
|
-
data: any;
|
|
4169
4129
|
} | null>;
|
|
4170
4130
|
options: LineOptions;
|
|
4171
4131
|
};
|
|
@@ -4231,8 +4191,8 @@ declare const socialProviders: {
|
|
|
4231
4191
|
idToken: string | undefined;
|
|
4232
4192
|
}>;
|
|
4233
4193
|
refreshAccessToken: ((refreshToken: string) => Promise<OAuth2Tokens>) | ((refreshToken: string) => Promise<{
|
|
4234
|
-
accessToken:
|
|
4235
|
-
refreshToken:
|
|
4194
|
+
accessToken: string | undefined;
|
|
4195
|
+
refreshToken: string | undefined;
|
|
4236
4196
|
accessTokenExpiresAt: Date | undefined;
|
|
4237
4197
|
}>);
|
|
4238
4198
|
verifyIdToken(token: string, nonce: string | undefined): Promise<boolean>;
|
|
@@ -4849,8 +4809,8 @@ declare const paypal: (options: PayPalOptions) => {
|
|
|
4849
4809
|
idToken: string | undefined;
|
|
4850
4810
|
}>;
|
|
4851
4811
|
refreshAccessToken: ((refreshToken: string) => Promise<OAuth2Tokens>) | ((refreshToken: string) => Promise<{
|
|
4852
|
-
accessToken:
|
|
4853
|
-
refreshToken:
|
|
4812
|
+
accessToken: string | undefined;
|
|
4813
|
+
refreshToken: string | undefined;
|
|
4854
4814
|
accessTokenExpiresAt: Date | undefined;
|
|
4855
4815
|
}>);
|
|
4856
4816
|
verifyIdToken(token: string, nonce: string | undefined): Promise<boolean>;
|
|
@@ -132,7 +132,7 @@ type ProviderOptions<Profile extends Record<string, any> = any> = {
|
|
|
132
132
|
* WeChat user profile information
|
|
133
133
|
* @see https://developers.weixin.qq.com/doc/oplatform/en/Website_App/WeChat_Login/Wechat_Login.html
|
|
134
134
|
*/
|
|
135
|
-
interface WeChatProfile extends Record<string,
|
|
135
|
+
interface WeChatProfile extends Record<string, unknown> {
|
|
136
136
|
/**
|
|
137
137
|
* User's unique OpenID
|
|
138
138
|
*/
|
|
@@ -576,27 +576,6 @@ declare const line: (options: LineOptions) => {
|
|
|
576
576
|
[key: string]: any;
|
|
577
577
|
};
|
|
578
578
|
data: any;
|
|
579
|
-
} | {
|
|
580
|
-
user: {
|
|
581
|
-
id: any;
|
|
582
|
-
name: any;
|
|
583
|
-
email: any;
|
|
584
|
-
image: any;
|
|
585
|
-
emailVerified: false;
|
|
586
|
-
} | {
|
|
587
|
-
id: any;
|
|
588
|
-
name: any;
|
|
589
|
-
email: any;
|
|
590
|
-
image: any;
|
|
591
|
-
emailVerified: boolean;
|
|
592
|
-
} | {
|
|
593
|
-
id: any;
|
|
594
|
-
name: any;
|
|
595
|
-
email: any;
|
|
596
|
-
image: any;
|
|
597
|
-
emailVerified: boolean;
|
|
598
|
-
};
|
|
599
|
-
data: any;
|
|
600
579
|
} | null>;
|
|
601
580
|
options: LineOptions;
|
|
602
581
|
};
|
|
@@ -774,7 +753,7 @@ interface KakaoProfile {
|
|
|
774
753
|
/** UTC datetime when the user signed up via Kakao Sync */
|
|
775
754
|
synched_at?: string | undefined;
|
|
776
755
|
/** Custom user properties */
|
|
777
|
-
properties?: Record<string,
|
|
756
|
+
properties?: Record<string, unknown> | undefined;
|
|
778
757
|
/** Kakao account info */
|
|
779
758
|
kakao_account: KakaoAccount;
|
|
780
759
|
/** Partner info */
|
|
@@ -803,7 +782,9 @@ declare const kakao: (options: KakaoOptions) => {
|
|
|
803
782
|
refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
|
|
804
783
|
getUserInfo(token: OAuth2Tokens & {
|
|
805
784
|
user?: {
|
|
806
|
-
name
|
|
785
|
+
name
|
|
786
|
+
/** Birth year (YYYY) */
|
|
787
|
+
? /** Birth year (YYYY) */: {
|
|
807
788
|
firstName?: string;
|
|
808
789
|
lastName?: string;
|
|
809
790
|
};
|
|
@@ -931,7 +912,7 @@ interface PhoneNumber {
|
|
|
931
912
|
* See the full documentation below:
|
|
932
913
|
* https://developers.zoom.us/docs/api/users/#tag/users/GET/users/{userId}
|
|
933
914
|
*/
|
|
934
|
-
interface ZoomProfile extends Record<string,
|
|
915
|
+
interface ZoomProfile extends Record<string, unknown> {
|
|
935
916
|
/** The user's account ID (Example: "q6gBJVO5TzexKYTb_I2rpg") */
|
|
936
917
|
account_id: string;
|
|
937
918
|
/** The user's account number (Example: 10009239) */
|
|
@@ -1148,7 +1129,7 @@ declare const salesforce: (options: SalesforceOptions) => {
|
|
|
1148
1129
|
options: SalesforceOptions;
|
|
1149
1130
|
};
|
|
1150
1131
|
|
|
1151
|
-
interface RobloxProfile extends Record<string,
|
|
1132
|
+
interface RobloxProfile extends Record<string, unknown> {
|
|
1152
1133
|
/** the user's id */
|
|
1153
1134
|
sub: string;
|
|
1154
1135
|
/** the user's username */
|
|
@@ -1263,7 +1244,7 @@ declare const reddit: (options: RedditOptions) => {
|
|
|
1263
1244
|
/**
|
|
1264
1245
|
* [More info](https://developers.tiktok.com/doc/tiktok-api-v2-get-user-info/)
|
|
1265
1246
|
*/
|
|
1266
|
-
interface TiktokProfile extends Record<string,
|
|
1247
|
+
interface TiktokProfile extends Record<string, unknown> {
|
|
1267
1248
|
data: {
|
|
1268
1249
|
user: {
|
|
1269
1250
|
/**
|
|
@@ -1419,7 +1400,7 @@ declare const tiktok: (options: TiktokOptions) => {
|
|
|
1419
1400
|
options: TiktokOptions;
|
|
1420
1401
|
};
|
|
1421
1402
|
|
|
1422
|
-
interface GitlabProfile extends Record<string,
|
|
1403
|
+
interface GitlabProfile extends Record<string, unknown> {
|
|
1423
1404
|
id: number;
|
|
1424
1405
|
username: string;
|
|
1425
1406
|
email: string;
|
|
@@ -2011,7 +1992,7 @@ declare const spotify: (options: SpotifyOptions) => {
|
|
|
2011
1992
|
options: SpotifyOptions;
|
|
2012
1993
|
};
|
|
2013
1994
|
|
|
2014
|
-
interface SlackProfile extends Record<string,
|
|
1995
|
+
interface SlackProfile extends Record<string, unknown> {
|
|
2015
1996
|
ok: boolean;
|
|
2016
1997
|
sub: string;
|
|
2017
1998
|
"https://slack.com/user_id": string;
|
|
@@ -2219,7 +2200,7 @@ interface VerifyGoogleIdTokenOptions {
|
|
|
2219
2200
|
* @see https://learn.microsoft.com/en-us/entra/identity-platform/id-token-claims-reference
|
|
2220
2201
|
*/
|
|
2221
2202
|
declare const MICROSOFT_CONSUMER_TENANT_ID = "9188040d-6c67-4c5b-b112-36a304b66dad";
|
|
2222
|
-
interface MicrosoftEntraIDProfile extends Record<string,
|
|
2203
|
+
interface MicrosoftEntraIDProfile extends Record<string, unknown> {
|
|
2223
2204
|
/** Identifies the intended recipient of the token */
|
|
2224
2205
|
aud: string;
|
|
2225
2206
|
/** Identifies the issuer, or "authorization server" that constructs and returns the token */
|
|
@@ -2515,7 +2496,7 @@ interface FacebookOptions extends ProviderOptions<FacebookProfile> {
|
|
|
2515
2496
|
configId?: string | undefined;
|
|
2516
2497
|
}
|
|
2517
2498
|
|
|
2518
|
-
interface DiscordProfile extends Record<string,
|
|
2499
|
+
interface DiscordProfile extends Record<string, unknown> {
|
|
2519
2500
|
/** the user's id (i.e. the numerical snowflake) */
|
|
2520
2501
|
id: string;
|
|
2521
2502
|
/** the user's username, not unique across the platform */
|
|
@@ -2649,7 +2630,7 @@ interface CognitoProfile {
|
|
|
2649
2630
|
iss: string;
|
|
2650
2631
|
exp: number;
|
|
2651
2632
|
iat: number;
|
|
2652
|
-
[key: string]:
|
|
2633
|
+
[key: string]: unknown;
|
|
2653
2634
|
}
|
|
2654
2635
|
interface CognitoOptions extends ProviderOptions<CognitoProfile> {
|
|
2655
2636
|
clientId: string | string[];
|
|
@@ -4145,27 +4126,6 @@ declare const socialProviders: {
|
|
|
4145
4126
|
[key: string]: any;
|
|
4146
4127
|
};
|
|
4147
4128
|
data: any;
|
|
4148
|
-
} | {
|
|
4149
|
-
user: {
|
|
4150
|
-
id: any;
|
|
4151
|
-
name: any;
|
|
4152
|
-
email: any;
|
|
4153
|
-
image: any;
|
|
4154
|
-
emailVerified: false;
|
|
4155
|
-
} | {
|
|
4156
|
-
id: any;
|
|
4157
|
-
name: any;
|
|
4158
|
-
email: any;
|
|
4159
|
-
image: any;
|
|
4160
|
-
emailVerified: boolean;
|
|
4161
|
-
} | {
|
|
4162
|
-
id: any;
|
|
4163
|
-
name: any;
|
|
4164
|
-
email: any;
|
|
4165
|
-
image: any;
|
|
4166
|
-
emailVerified: boolean;
|
|
4167
|
-
};
|
|
4168
|
-
data: any;
|
|
4169
4129
|
} | null>;
|
|
4170
4130
|
options: LineOptions;
|
|
4171
4131
|
};
|
|
@@ -4231,8 +4191,8 @@ declare const socialProviders: {
|
|
|
4231
4191
|
idToken: string | undefined;
|
|
4232
4192
|
}>;
|
|
4233
4193
|
refreshAccessToken: ((refreshToken: string) => Promise<OAuth2Tokens>) | ((refreshToken: string) => Promise<{
|
|
4234
|
-
accessToken:
|
|
4235
|
-
refreshToken:
|
|
4194
|
+
accessToken: string | undefined;
|
|
4195
|
+
refreshToken: string | undefined;
|
|
4236
4196
|
accessTokenExpiresAt: Date | undefined;
|
|
4237
4197
|
}>);
|
|
4238
4198
|
verifyIdToken(token: string, nonce: string | undefined): Promise<boolean>;
|
|
@@ -4849,8 +4809,8 @@ declare const paypal: (options: PayPalOptions) => {
|
|
|
4849
4809
|
idToken: string | undefined;
|
|
4850
4810
|
}>;
|
|
4851
4811
|
refreshAccessToken: ((refreshToken: string) => Promise<OAuth2Tokens>) | ((refreshToken: string) => Promise<{
|
|
4852
|
-
accessToken:
|
|
4853
|
-
refreshToken:
|
|
4812
|
+
accessToken: string | undefined;
|
|
4813
|
+
refreshToken: string | undefined;
|
|
4854
4814
|
accessTokenExpiresAt: Date | undefined;
|
|
4855
4815
|
}>);
|
|
4856
4816
|
verifyIdToken(token: string, nonce: string | undefined): Promise<boolean>;
|
package/dist/social-providers.js
CHANGED
|
@@ -223,15 +223,19 @@ function getOAuth2Tokens(data) {
|
|
|
223
223
|
const now = /* @__PURE__ */ new Date();
|
|
224
224
|
return new Date(now.getTime() + seconds * 1e3);
|
|
225
225
|
};
|
|
226
|
+
const record = data;
|
|
227
|
+
const expiresIn = typeof record.expires_in === "number" ? record.expires_in : void 0;
|
|
228
|
+
const refreshTokenExpiresIn = typeof record.refresh_token_expires_in === "number" ? record.refresh_token_expires_in : void 0;
|
|
229
|
+
const scope = record.scope;
|
|
226
230
|
return {
|
|
227
|
-
tokenType:
|
|
228
|
-
accessToken:
|
|
229
|
-
refreshToken:
|
|
230
|
-
accessTokenExpiresAt:
|
|
231
|
-
refreshTokenExpiresAt:
|
|
232
|
-
scopes:
|
|
233
|
-
idToken:
|
|
234
|
-
raw:
|
|
231
|
+
tokenType: typeof record.token_type === "string" ? record.token_type : void 0,
|
|
232
|
+
accessToken: typeof record.access_token === "string" ? record.access_token : void 0,
|
|
233
|
+
refreshToken: typeof record.refresh_token === "string" ? record.refresh_token : void 0,
|
|
234
|
+
accessTokenExpiresAt: expiresIn != null ? getDate(expiresIn) : void 0,
|
|
235
|
+
refreshTokenExpiresAt: refreshTokenExpiresIn != null ? getDate(refreshTokenExpiresIn) : void 0,
|
|
236
|
+
scopes: scope ? typeof scope === "string" ? scope.split(" ") : Array.isArray(scope) ? scope.filter((s) => typeof s === "string") : [] : [],
|
|
237
|
+
idToken: typeof record.id_token === "string" ? record.id_token : void 0,
|
|
238
|
+
raw: record
|
|
235
239
|
};
|
|
236
240
|
}
|
|
237
241
|
|
|
@@ -2162,9 +2166,9 @@ var line = (options) => {
|
|
|
2162
2166
|
}
|
|
2163
2167
|
if (!profile) return null;
|
|
2164
2168
|
const userMap = await options.mapProfileToUser?.(profile);
|
|
2165
|
-
const id = profile.sub
|
|
2166
|
-
const name = profile.name ||
|
|
2167
|
-
const image = profile.picture ||
|
|
2169
|
+
const id = profile.sub;
|
|
2170
|
+
const name = profile.name || "";
|
|
2171
|
+
const image = profile.picture || void 0;
|
|
2168
2172
|
const email = profile.email;
|
|
2169
2173
|
return {
|
|
2170
2174
|
user: {
|