@better-auth/core 1.7.0-rc.1 → 1.7.0-rc.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.
Files changed (208) hide show
  1. package/dist/api/index.d.mts +28 -28
  2. package/dist/async_hooks/index.d.mts +0 -1
  3. package/dist/async_hooks/pure.index.d.mts +0 -1
  4. package/dist/context/endpoint-context.d.mts +1 -1
  5. package/dist/context/global.d.mts +0 -1
  6. package/dist/context/global.mjs +1 -1
  7. package/dist/context/request-state.d.mts +0 -1
  8. package/dist/context/request-state.mjs +8 -5
  9. package/dist/context/transaction.d.mts +8 -3
  10. package/dist/context/transaction.mjs +27 -10
  11. package/dist/db/adapter/factory.d.mts +3 -5
  12. package/dist/db/adapter/factory.mjs +7 -5
  13. package/dist/db/adapter/get-default-field-name.d.mts +2 -9
  14. package/dist/db/adapter/get-default-model-name.d.mts +1 -5
  15. package/dist/db/adapter/get-default-model-name.mjs +6 -5
  16. package/dist/db/adapter/get-field-attributes.d.mts +4 -11
  17. package/dist/db/adapter/get-field-name.d.mts +2 -9
  18. package/dist/db/adapter/get-id-field.d.mts +4 -12
  19. package/dist/db/adapter/get-model-name.d.mts +1 -5
  20. package/dist/db/adapter/index.d.mts +7 -32
  21. package/dist/db/adapter/types.d.mts +5 -17
  22. package/dist/db/adapter/utils.d.mts +0 -1
  23. package/dist/db/database-index.d.mts +44 -0
  24. package/dist/db/database-index.mjs +168 -0
  25. package/dist/db/get-tables.d.mts +7 -1
  26. package/dist/db/get-tables.mjs +47 -6
  27. package/dist/db/index.d.mts +3 -3
  28. package/dist/db/index.mjs +2 -2
  29. package/dist/db/internal.d.mts +3 -0
  30. package/dist/db/internal.mjs +3 -0
  31. package/dist/db/plugin.d.mts +4 -3
  32. package/dist/db/schema/account.d.mts +16 -3
  33. package/dist/db/schema/account.mjs +35 -2
  34. package/dist/db/schema/rate-limit.d.mts +1 -1
  35. package/dist/db/schema/rate-limit.mjs +9 -0
  36. package/dist/db/schema/session.d.mts +1 -1
  37. package/dist/db/schema/shared.d.mts +0 -1
  38. package/dist/db/schema/user.d.mts +1 -1
  39. package/dist/db/schema/verification.d.mts +1 -1
  40. package/dist/db/type.d.mts +17 -9
  41. package/dist/env/logger.d.mts +25 -25
  42. package/dist/error/codes.d.mts +0 -1
  43. package/dist/error/index.d.mts +0 -1
  44. package/dist/index.d.mts +1 -1
  45. package/dist/instrumentation/attributes.d.mts +0 -1
  46. package/dist/instrumentation/pure.index.d.mts +0 -1
  47. package/dist/instrumentation/tracer.mjs +1 -1
  48. package/dist/oauth2/authorization-params.d.mts +0 -1
  49. package/dist/oauth2/client-assertion.d.mts +3 -13
  50. package/dist/oauth2/client-credentials-token.d.mts +3 -17
  51. package/dist/oauth2/client-credentials-token.mjs +1 -4
  52. package/dist/oauth2/create-authorization-url.d.mts +3 -21
  53. package/dist/oauth2/dpop.d.mts +2 -23
  54. package/dist/oauth2/dpop.mjs +1 -1
  55. package/dist/oauth2/index.d.mts +2 -2
  56. package/dist/oauth2/oauth-provider.d.mts +85 -36
  57. package/dist/oauth2/refresh-access-token.d.mts +3 -19
  58. package/dist/oauth2/refresh-access-token.mjs +3 -9
  59. package/dist/oauth2/reject-redirects.mjs +1 -1
  60. package/dist/oauth2/token-endpoint-auth.d.mts +0 -1
  61. package/dist/oauth2/utils.d.mts +0 -1
  62. package/dist/oauth2/utils.mjs +2 -3
  63. package/dist/oauth2/validate-authorization-code.d.mts +5 -29
  64. package/dist/oauth2/verify-id-token.d.mts +3 -2
  65. package/dist/oauth2/verify-id-token.mjs +3 -3
  66. package/dist/oauth2/verify.d.mts +5 -7
  67. package/dist/oauth2/verify.mjs +2 -2
  68. package/dist/social-providers/apple.d.mts +9 -24
  69. package/dist/social-providers/apple.mjs +2 -1
  70. package/dist/social-providers/atlassian.d.mts +18 -19
  71. package/dist/social-providers/atlassian.mjs +1 -1
  72. package/dist/social-providers/cognito.d.mts +33 -22
  73. package/dist/social-providers/cognito.mjs +2 -2
  74. package/dist/social-providers/discord.d.mts +7 -20
  75. package/dist/social-providers/discord.mjs +1 -1
  76. package/dist/social-providers/dropbox.d.mts +7 -22
  77. package/dist/social-providers/dropbox.mjs +1 -1
  78. package/dist/social-providers/facebook.d.mts +19 -27
  79. package/dist/social-providers/facebook.mjs +6 -17
  80. package/dist/social-providers/figma.d.mts +7 -22
  81. package/dist/social-providers/figma.mjs +1 -1
  82. package/dist/social-providers/github.d.mts +7 -23
  83. package/dist/social-providers/github.mjs +1 -1
  84. package/dist/social-providers/gitlab.d.mts +6 -43
  85. package/dist/social-providers/gitlab.mjs +1 -1
  86. package/dist/social-providers/google.d.mts +10 -32
  87. package/dist/social-providers/google.mjs +2 -1
  88. package/dist/social-providers/huggingface.d.mts +7 -22
  89. package/dist/social-providers/huggingface.mjs +1 -1
  90. package/dist/social-providers/index.d.mts +229 -787
  91. package/dist/social-providers/kakao.d.mts +8 -33
  92. package/dist/social-providers/kakao.mjs +1 -1
  93. package/dist/social-providers/kick.d.mts +7 -22
  94. package/dist/social-providers/kick.mjs +1 -1
  95. package/dist/social-providers/line.d.mts +8 -44
  96. package/dist/social-providers/line.mjs +4 -6
  97. package/dist/social-providers/linear.d.mts +7 -21
  98. package/dist/social-providers/linear.mjs +1 -1
  99. package/dist/social-providers/linkedin.d.mts +7 -21
  100. package/dist/social-providers/linkedin.mjs +1 -1
  101. package/dist/social-providers/microsoft-entra-id.d.mts +8 -18
  102. package/dist/social-providers/microsoft-entra-id.mjs +18 -2
  103. package/dist/social-providers/naver.d.mts +27 -42
  104. package/dist/social-providers/naver.mjs +1 -1
  105. package/dist/social-providers/notion.d.mts +7 -21
  106. package/dist/social-providers/notion.mjs +1 -1
  107. package/dist/social-providers/paybin.d.mts +8 -23
  108. package/dist/social-providers/paybin.mjs +2 -1
  109. package/dist/social-providers/paypal.d.mts +8 -33
  110. package/dist/social-providers/paypal.mjs +1 -1
  111. package/dist/social-providers/polar.d.mts +7 -22
  112. package/dist/social-providers/polar.mjs +1 -1
  113. package/dist/social-providers/railway.d.mts +7 -22
  114. package/dist/social-providers/railway.mjs +1 -1
  115. package/dist/social-providers/reddit.d.mts +7 -20
  116. package/dist/social-providers/reddit.mjs +1 -1
  117. package/dist/social-providers/roblox.d.mts +7 -20
  118. package/dist/social-providers/roblox.mjs +1 -1
  119. package/dist/social-providers/salesforce.d.mts +7 -22
  120. package/dist/social-providers/salesforce.mjs +1 -1
  121. package/dist/social-providers/slack.d.mts +7 -20
  122. package/dist/social-providers/slack.mjs +1 -1
  123. package/dist/social-providers/spotify.d.mts +7 -22
  124. package/dist/social-providers/spotify.mjs +1 -1
  125. package/dist/social-providers/tiktok.d.mts +10 -22
  126. package/dist/social-providers/tiktok.mjs +1 -1
  127. package/dist/social-providers/twitch.d.mts +7 -20
  128. package/dist/social-providers/twitch.mjs +1 -1
  129. package/dist/social-providers/twitter.d.mts +29 -26
  130. package/dist/social-providers/twitter.mjs +1 -1
  131. package/dist/social-providers/vercel.d.mts +7 -22
  132. package/dist/social-providers/vercel.mjs +1 -1
  133. package/dist/social-providers/vk.d.mts +8 -24
  134. package/dist/social-providers/vk.mjs +5 -6
  135. package/dist/social-providers/wechat.d.mts +7 -19
  136. package/dist/social-providers/wechat.mjs +1 -1
  137. package/dist/social-providers/zoom.d.mts +9 -25
  138. package/dist/social-providers/zoom.mjs +1 -1
  139. package/dist/types/context.d.mts +16 -9
  140. package/dist/types/cookie.d.mts +0 -1
  141. package/dist/types/helper.d.mts +1 -1
  142. package/dist/types/index.d.mts +1 -1
  143. package/dist/types/init-options.d.mts +37 -26
  144. package/dist/types/plugin-client.d.mts +1 -3
  145. package/dist/types/plugin.d.mts +2 -2
  146. package/dist/utils/async.d.mts +0 -1
  147. package/dist/utils/db.d.mts +1 -0
  148. package/dist/utils/deprecate.d.mts +0 -1
  149. package/dist/utils/error-codes.d.mts +2 -2
  150. package/dist/utils/host.d.mts +27 -1
  151. package/dist/utils/host.mjs +1 -1
  152. package/dist/utils/ip.d.mts +1 -0
  153. package/dist/utils/ip.mjs +1 -1
  154. package/dist/utils/is-api-error.d.mts +0 -1
  155. package/dist/utils/redirect-uri.d.mts +0 -1
  156. package/package.json +10 -2
  157. package/src/context/request-state.ts +26 -6
  158. package/src/context/transaction.ts +37 -18
  159. package/src/db/adapter/factory.ts +24 -18
  160. package/src/db/adapter/get-default-model-name.ts +23 -14
  161. package/src/db/database-index.ts +351 -0
  162. package/src/db/get-tables.ts +89 -9
  163. package/src/db/index.ts +4 -0
  164. package/src/db/internal.ts +12 -0
  165. package/src/db/plugin.ts +3 -1
  166. package/src/db/schema/account.ts +27 -1
  167. package/src/db/schema/user.ts +1 -1
  168. package/src/db/type.ts +12 -0
  169. package/src/oauth2/index.ts +3 -0
  170. package/src/oauth2/oauth-provider.ts +94 -36
  171. package/src/oauth2/verify-id-token.ts +4 -2
  172. package/src/social-providers/apple.ts +2 -1
  173. package/src/social-providers/atlassian.ts +1 -1
  174. package/src/social-providers/cognito.ts +2 -2
  175. package/src/social-providers/discord.ts +1 -1
  176. package/src/social-providers/dropbox.ts +1 -1
  177. package/src/social-providers/facebook.ts +21 -28
  178. package/src/social-providers/figma.ts +1 -1
  179. package/src/social-providers/github.ts +1 -1
  180. package/src/social-providers/gitlab.ts +1 -1
  181. package/src/social-providers/google.ts +2 -1
  182. package/src/social-providers/huggingface.ts +1 -1
  183. package/src/social-providers/kakao.ts +1 -1
  184. package/src/social-providers/kick.ts +1 -1
  185. package/src/social-providers/line.ts +7 -12
  186. package/src/social-providers/linear.ts +1 -1
  187. package/src/social-providers/linkedin.ts +1 -1
  188. package/src/social-providers/microsoft-entra-id.ts +3 -2
  189. package/src/social-providers/naver.ts +1 -1
  190. package/src/social-providers/notion.ts +1 -1
  191. package/src/social-providers/paybin.ts +2 -1
  192. package/src/social-providers/paypal.ts +1 -1
  193. package/src/social-providers/polar.ts +1 -1
  194. package/src/social-providers/railway.ts +1 -1
  195. package/src/social-providers/reddit.ts +1 -1
  196. package/src/social-providers/roblox.ts +1 -1
  197. package/src/social-providers/salesforce.ts +1 -1
  198. package/src/social-providers/slack.ts +1 -1
  199. package/src/social-providers/spotify.ts +1 -1
  200. package/src/social-providers/tiktok.ts +2 -2
  201. package/src/social-providers/twitch.ts +1 -1
  202. package/src/social-providers/twitter.ts +1 -1
  203. package/src/social-providers/vercel.ts +1 -1
  204. package/src/social-providers/vk.ts +2 -2
  205. package/src/social-providers/wechat.ts +1 -1
  206. package/src/social-providers/zoom.ts +1 -1
  207. package/src/types/context.ts +21 -14
  208. package/src/types/init-options.ts +15 -14
@@ -2,7 +2,7 @@ import { AppleNonConformUser, AppleOptions, AppleProfile, apple, getApplePublicK
2
2
  import { AtlassianOptions, AtlassianProfile, atlassian } from "./atlassian.mjs";
3
3
  import { CognitoOptions, CognitoProfile, cognito, getCognitoPublicKey } from "./cognito.mjs";
4
4
  import { DiscordOptions, DiscordProfile, discord } from "./discord.mjs";
5
- import { FacebookOptions, FacebookProfile, facebook } from "./facebook.mjs";
5
+ import { FacebookGraphProfile, FacebookLimitedLoginProfile, FacebookOptions, FacebookProfile, facebook } from "./facebook.mjs";
6
6
  import { FigmaOptions, FigmaProfile, figma } from "./figma.mjs";
7
7
  import { GithubOptions, GithubProfile, github } from "./github.mjs";
8
8
  import { MicrosoftEntraIDProfile, MicrosoftOptions, getMicrosoftPublicKey, microsoft } from "./microsoft-entra-id.mjs";
@@ -34,21 +34,18 @@ import { RailwayOptions, RailwayProfile, railway } from "./railway.mjs";
34
34
  import { VercelOptions, VercelProfile, vercel } from "./vercel.mjs";
35
35
  import { WeChatOptions, WeChatProfile, wechat } from "./wechat.mjs";
36
36
  import { AwaitableFunction } from "../types/helper.mjs";
37
- import { OAuth2Tokens } from "../oauth2/oauth-provider.mjs";
37
+ import "../types/index.mjs";
38
+ import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext } from "../oauth2/oauth-provider.mjs";
39
+ import "../oauth2/index.mjs";
38
40
  import * as z from "zod";
39
- import * as jose from "jose";
40
-
41
41
  //#region src/social-providers/index.d.ts
42
42
  declare const socialProviders: {
43
43
  apple: (options: AppleOptions) => {
44
44
  id: "apple";
45
45
  name: string;
46
- createAuthorizationURL({
47
- state,
48
- scopes,
49
- redirectURI,
50
- additionalParams
51
- }: {
46
+ accountSubject: ({ profile }: OAuthAccountKeyContext<AppleProfile>) => string;
47
+ accountIssuer: string;
48
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
52
49
  state: string;
53
50
  codeVerifier: string;
54
51
  scopes?: string[] | undefined;
@@ -58,18 +55,14 @@ declare const socialProviders: {
58
55
  idTokenNonce?: string | undefined;
59
56
  additionalParams?: Record<string, string> | undefined;
60
57
  }): Promise<URL>;
61
- validateAuthorizationCode: ({
62
- code,
63
- codeVerifier,
64
- redirectURI
65
- }: {
58
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
66
59
  code: string;
67
60
  redirectURI: string;
68
61
  codeVerifier?: string | undefined;
69
62
  deviceId?: string | undefined;
70
63
  }) => Promise<OAuth2Tokens>;
71
64
  idToken: {
72
- jwks: (header: jose.JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
65
+ jwks: (header: import("jose").JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
73
66
  issuer: string;
74
67
  audience: string | string[];
75
68
  maxTokenAge: string;
@@ -86,28 +79,16 @@ declare const socialProviders: {
86
79
  email?: string;
87
80
  } | undefined;
88
81
  }): Promise<{
89
- user: {
90
- id: string;
91
- name?: string;
92
- email?: string | null;
93
- image?: string;
94
- emailVerified: boolean;
95
- [key: string]: any;
96
- };
97
- data: any;
82
+ user: OAuth2UserInfo & Record<string, unknown>;
83
+ data: AppleProfile;
98
84
  } | null>;
99
85
  options: AppleOptions;
100
86
  };
101
87
  atlassian: (options: AtlassianOptions) => {
102
88
  id: "atlassian";
103
89
  name: string;
104
- createAuthorizationURL({
105
- state,
106
- scopes,
107
- codeVerifier,
108
- redirectURI,
109
- additionalParams
110
- }: {
90
+ accountSubject: ({ profile }: OAuthAccountKeyContext<AtlassianProfile>) => string;
91
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
111
92
  state: string;
112
93
  codeVerifier: string;
113
94
  scopes?: string[] | undefined;
@@ -117,11 +98,7 @@ declare const socialProviders: {
117
98
  idTokenNonce?: string | undefined;
118
99
  additionalParams?: Record<string, string> | undefined;
119
100
  }): Promise<URL>;
120
- validateAuthorizationCode: ({
121
- code,
122
- codeVerifier,
123
- redirectURI
124
- }: {
101
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
125
102
  code: string;
126
103
  redirectURI: string;
127
104
  codeVerifier?: string | undefined;
@@ -138,28 +115,31 @@ declare const socialProviders: {
138
115
  email?: string;
139
116
  } | undefined;
140
117
  }): Promise<{
118
+ user: OAuth2UserInfo & Record<string, unknown>;
119
+ data: AtlassianProfile;
120
+ } | {
141
121
  user: {
142
- id: string;
143
- name?: string;
144
- email?: string | null;
145
- image?: string;
122
+ id?: never;
123
+ name: string;
124
+ email: string | null;
125
+ image: string;
146
126
  emailVerified: boolean;
147
- [key: string]: any;
148
127
  };
149
- data: any;
128
+ data: {
129
+ account_id: string;
130
+ name: string;
131
+ email?: string | undefined;
132
+ picture?: string | undefined;
133
+ };
150
134
  } | null>;
151
135
  options: AtlassianOptions;
152
136
  };
153
137
  cognito: (options: CognitoOptions) => {
154
138
  id: "cognito";
155
139
  name: string;
156
- createAuthorizationURL({
157
- state,
158
- scopes,
159
- codeVerifier,
160
- redirectURI,
161
- additionalParams
162
- }: {
140
+ accountSubject: ({ profile }: OAuthAccountKeyContext<CognitoProfile>) => string;
141
+ accountIssuer: string;
142
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
163
143
  state: string;
164
144
  codeVerifier: string;
165
145
  scopes?: string[] | undefined;
@@ -169,11 +149,7 @@ declare const socialProviders: {
169
149
  idTokenNonce?: string | undefined;
170
150
  additionalParams?: Record<string, string> | undefined;
171
151
  }): Promise<URL>;
172
- validateAuthorizationCode: ({
173
- code,
174
- codeVerifier,
175
- redirectURI
176
- }: {
152
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
177
153
  code: string;
178
154
  redirectURI: string;
179
155
  codeVerifier?: string | undefined;
@@ -181,7 +157,7 @@ declare const socialProviders: {
181
157
  }) => Promise<OAuth2Tokens>;
182
158
  refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
183
159
  idToken: {
184
- jwks: (header: jose.JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
160
+ jwks: (header: import("jose").JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
185
161
  issuer: string;
186
162
  audience: string | string[];
187
163
  maxTokenAge: string;
@@ -196,27 +172,43 @@ declare const socialProviders: {
196
172
  email?: string;
197
173
  } | undefined;
198
174
  }): Promise<{
175
+ user: OAuth2UserInfo & Record<string, unknown>;
176
+ data: CognitoProfile;
177
+ } | {
199
178
  user: {
200
- id: string;
201
- name?: string;
202
- email?: string | null;
203
- image?: string;
179
+ id?: never;
180
+ name: string;
181
+ email: string | null;
182
+ image: string;
204
183
  emailVerified: boolean;
205
- [key: string]: any;
206
184
  };
207
- data: any;
185
+ data: {
186
+ name: string;
187
+ sub: string;
188
+ email: string;
189
+ email_verified: boolean;
190
+ given_name?: string | undefined;
191
+ family_name?: string | undefined;
192
+ picture?: string | undefined;
193
+ username?: string | undefined;
194
+ locale?: string | undefined;
195
+ phone_number?: string | undefined;
196
+ phone_number_verified?: boolean | undefined;
197
+ aud: string | (string & string[]);
198
+ iss: string;
199
+ exp: number;
200
+ iat: number;
201
+ jti?: string;
202
+ nbf?: number;
203
+ };
208
204
  } | null>;
209
205
  options: CognitoOptions;
210
206
  };
211
207
  discord: (options: DiscordOptions) => {
212
208
  id: "discord";
213
209
  name: string;
214
- createAuthorizationURL({
215
- state,
216
- scopes,
217
- redirectURI,
218
- additionalParams
219
- }: {
210
+ accountSubject: ({ profile }: OAuthAccountKeyContext<DiscordProfile>) => string;
211
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
220
212
  state: string;
221
213
  codeVerifier: string;
222
214
  scopes?: string[] | undefined;
@@ -226,10 +218,7 @@ declare const socialProviders: {
226
218
  idTokenNonce?: string | undefined;
227
219
  additionalParams?: Record<string, string> | undefined;
228
220
  }): Promise<URL>;
229
- validateAuthorizationCode: ({
230
- code,
231
- redirectURI
232
- }: {
221
+ validateAuthorizationCode: ({ code, redirectURI }: {
233
222
  code: string;
234
223
  redirectURI: string;
235
224
  codeVerifier?: string | undefined;
@@ -246,28 +235,17 @@ declare const socialProviders: {
246
235
  email?: string;
247
236
  } | undefined;
248
237
  }): Promise<{
249
- user: {
250
- id: string;
251
- name?: string;
252
- email?: string | null;
253
- image?: string;
254
- emailVerified: boolean;
255
- [key: string]: any;
256
- };
257
- data: any;
238
+ user: OAuth2UserInfo & Record<string, unknown>;
239
+ data: DiscordProfile;
258
240
  } | null>;
259
241
  options: DiscordOptions;
260
242
  };
261
243
  facebook: (options: FacebookOptions) => {
262
244
  id: "facebook";
263
245
  name: string;
264
- createAuthorizationURL({
265
- state,
266
- scopes,
267
- redirectURI,
268
- loginHint,
269
- additionalParams
270
- }: {
246
+ accountSubject: ({ profile }: OAuthAccountKeyContext<FacebookProfile>) => string;
247
+ accountIssuer: string;
248
+ createAuthorizationURL({ state, scopes, redirectURI, loginHint, additionalParams }: {
271
249
  state: string;
272
250
  codeVerifier: string;
273
251
  scopes?: string[] | undefined;
@@ -277,10 +255,7 @@ declare const socialProviders: {
277
255
  idTokenNonce?: string | undefined;
278
256
  additionalParams?: Record<string, string> | undefined;
279
257
  }): Promise<URL>;
280
- validateAuthorizationCode: ({
281
- code,
282
- redirectURI
283
- }: {
258
+ validateAuthorizationCode: ({ code, redirectURI }: {
284
259
  code: string;
285
260
  redirectURI: string;
286
261
  codeVerifier?: string | undefined;
@@ -288,12 +263,12 @@ declare const socialProviders: {
288
263
  }) => Promise<OAuth2Tokens>;
289
264
  idToken: {
290
265
  jwks: {
291
- (protectedHeader?: jose.JWSHeaderParameters, token?: jose.FlattenedJWSInput): Promise<jose.CryptoKey>;
266
+ (protectedHeader?: import("jose").JWSHeaderParameters, token?: import("jose").FlattenedJWSInput): Promise<import("jose").CryptoKey>;
292
267
  coolingDown: boolean;
293
268
  fresh: boolean;
294
269
  reloading: boolean;
295
270
  reload: () => Promise<void>;
296
- jwks: () => jose.JSONWebKeySet | undefined;
271
+ jwks: () => import("jose").JSONWebKeySet | undefined;
297
272
  };
298
273
  issuer: string;
299
274
  audience: string | string[];
@@ -311,28 +286,16 @@ declare const socialProviders: {
311
286
  email?: string;
312
287
  } | undefined;
313
288
  }): Promise<{
314
- user: {
315
- id: string;
316
- name?: string;
317
- email?: string | null;
318
- image?: string;
319
- emailVerified: boolean;
320
- [key: string]: any;
321
- };
322
- data: any;
289
+ user: OAuth2UserInfo & Record<string, unknown>;
290
+ data: FacebookProfile;
323
291
  } | null>;
324
292
  options: FacebookOptions;
325
293
  };
326
294
  figma: (options: FigmaOptions) => {
327
295
  id: "figma";
328
296
  name: string;
329
- createAuthorizationURL({
330
- state,
331
- scopes,
332
- codeVerifier,
333
- redirectURI,
334
- additionalParams
335
- }: {
297
+ accountSubject: ({ profile }: OAuthAccountKeyContext<FigmaProfile>) => string;
298
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
336
299
  state: string;
337
300
  codeVerifier: string;
338
301
  scopes?: string[] | undefined;
@@ -342,11 +305,7 @@ declare const socialProviders: {
342
305
  idTokenNonce?: string | undefined;
343
306
  additionalParams?: Record<string, string> | undefined;
344
307
  }): Promise<URL>;
345
- validateAuthorizationCode: ({
346
- code,
347
- codeVerifier,
348
- redirectURI
349
- }: {
308
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
350
309
  code: string;
351
310
  redirectURI: string;
352
311
  codeVerifier?: string | undefined;
@@ -363,29 +322,16 @@ declare const socialProviders: {
363
322
  email?: string;
364
323
  } | undefined;
365
324
  }): Promise<{
366
- user: {
367
- id: string;
368
- name?: string;
369
- email?: string | null;
370
- image?: string;
371
- emailVerified: boolean;
372
- [key: string]: any;
373
- };
374
- data: any;
325
+ user: OAuth2UserInfo & Record<string, unknown>;
326
+ data: FigmaProfile;
375
327
  } | null>;
376
328
  options: FigmaOptions;
377
329
  };
378
330
  github: (options: GithubOptions) => {
379
331
  id: "github";
380
332
  name: string;
381
- createAuthorizationURL({
382
- state,
383
- scopes,
384
- loginHint,
385
- codeVerifier,
386
- redirectURI,
387
- additionalParams
388
- }: {
333
+ accountSubject: ({ profile }: OAuthAccountKeyContext<GithubProfile>) => string;
334
+ createAuthorizationURL({ state, scopes, loginHint, codeVerifier, redirectURI, additionalParams }: {
389
335
  state: string;
390
336
  codeVerifier: string;
391
337
  scopes?: string[] | undefined;
@@ -395,11 +341,7 @@ declare const socialProviders: {
395
341
  idTokenNonce?: string | undefined;
396
342
  additionalParams?: Record<string, string> | undefined;
397
343
  }): Promise<URL>;
398
- validateAuthorizationCode: ({
399
- code,
400
- codeVerifier,
401
- redirectURI
402
- }: {
344
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
403
345
  code: string;
404
346
  redirectURI: string;
405
347
  codeVerifier?: string | undefined;
@@ -416,21 +358,16 @@ declare const socialProviders: {
416
358
  email?: string;
417
359
  } | undefined;
418
360
  }): Promise<{
419
- user: {
420
- id: string;
421
- name?: string;
422
- email?: string | null;
423
- image?: string;
424
- emailVerified: boolean;
425
- [key: string]: any;
426
- };
427
- data: any;
361
+ user: OAuth2UserInfo & Record<string, unknown>;
362
+ data: GithubProfile;
428
363
  } | null>;
429
364
  options: GithubOptions;
430
365
  };
431
366
  microsoft: (options: MicrosoftOptions) => {
432
367
  id: "microsoft";
433
368
  name: string;
369
+ accountSubject: ({ profile }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
370
+ accountIssuer: ({ profile }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
434
371
  createAuthorizationURL(data: {
435
372
  state: string;
436
373
  codeVerifier: string;
@@ -441,18 +378,14 @@ declare const socialProviders: {
441
378
  idTokenNonce?: string | undefined;
442
379
  additionalParams?: Record<string, string> | undefined;
443
380
  }): Promise<URL>;
444
- validateAuthorizationCode({
445
- code,
446
- codeVerifier,
447
- redirectURI
448
- }: {
381
+ validateAuthorizationCode({ code, codeVerifier, redirectURI }: {
449
382
  code: string;
450
383
  redirectURI: string;
451
384
  codeVerifier?: string | undefined;
452
385
  deviceId?: string | undefined;
453
386
  }): Promise<OAuth2Tokens>;
454
387
  idToken: {
455
- jwks: (header: jose.JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
388
+ jwks: (header: import("jose").JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
456
389
  audience: string | string[];
457
390
  maxTokenAge: string;
458
391
  issuer: string | undefined;
@@ -468,15 +401,8 @@ declare const socialProviders: {
468
401
  email?: string;
469
402
  } | undefined;
470
403
  }): Promise<{
471
- user: {
472
- id: string;
473
- name?: string;
474
- email?: string | null;
475
- image?: string;
476
- emailVerified: boolean;
477
- [key: string]: any;
478
- };
479
- data: any;
404
+ user: OAuth2UserInfo & Record<string, unknown>;
405
+ data: MicrosoftEntraIDProfile;
480
406
  } | null>;
481
407
  refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
482
408
  options: MicrosoftOptions;
@@ -484,15 +410,9 @@ declare const socialProviders: {
484
410
  google: (options: GoogleOptions) => {
485
411
  id: "google";
486
412
  name: string;
487
- createAuthorizationURL({
488
- state,
489
- scopes,
490
- codeVerifier,
491
- redirectURI,
492
- loginHint,
493
- display,
494
- additionalParams
495
- }: {
413
+ accountSubject: ({ profile }: OAuthAccountKeyContext<GoogleProfile>) => string;
414
+ accountIssuer: string;
415
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint, display, additionalParams }: {
496
416
  state: string;
497
417
  codeVerifier: string;
498
418
  scopes?: string[] | undefined;
@@ -502,11 +422,7 @@ declare const socialProviders: {
502
422
  idTokenNonce?: string | undefined;
503
423
  additionalParams?: Record<string, string> | undefined;
504
424
  }): Promise<URL>;
505
- validateAuthorizationCode: ({
506
- code,
507
- codeVerifier,
508
- redirectURI
509
- }: {
425
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
510
426
  code: string;
511
427
  redirectURI: string;
512
428
  codeVerifier?: string | undefined;
@@ -514,7 +430,7 @@ declare const socialProviders: {
514
430
  }) => Promise<OAuth2Tokens>;
515
431
  refreshAccessToken: (refreshToken: string) => Promise<OAuth2Tokens>;
516
432
  idToken: {
517
- jwks: (header: jose.JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
433
+ jwks: (header: import("jose").JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
518
434
  issuer: string[];
519
435
  audience: string | string[];
520
436
  maxTokenAge: string;
@@ -530,28 +446,16 @@ declare const socialProviders: {
530
446
  email?: string;
531
447
  } | undefined;
532
448
  }): Promise<{
533
- user: {
534
- id: string;
535
- name?: string;
536
- email?: string | null;
537
- image?: string;
538
- emailVerified: boolean;
539
- [key: string]: any;
540
- };
541
- data: any;
449
+ user: OAuth2UserInfo & Record<string, unknown>;
450
+ data: GoogleProfile;
542
451
  } | null>;
543
452
  options: GoogleOptions;
544
453
  };
545
454
  huggingface: (options: HuggingFaceOptions) => {
546
455
  id: "huggingface";
547
456
  name: string;
548
- createAuthorizationURL({
549
- state,
550
- scopes,
551
- codeVerifier,
552
- redirectURI,
553
- additionalParams
554
- }: {
457
+ accountSubject: ({ profile }: OAuthAccountKeyContext<HuggingFaceProfile>) => string;
458
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
555
459
  state: string;
556
460
  codeVerifier: string;
557
461
  scopes?: string[] | undefined;
@@ -561,11 +465,7 @@ declare const socialProviders: {
561
465
  idTokenNonce?: string | undefined;
562
466
  additionalParams?: Record<string, string> | undefined;
563
467
  }): Promise<URL>;
564
- validateAuthorizationCode: ({
565
- code,
566
- codeVerifier,
567
- redirectURI
568
- }: {
468
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
569
469
  code: string;
570
470
  redirectURI: string;
571
471
  codeVerifier?: string | undefined;
@@ -582,27 +482,16 @@ declare const socialProviders: {
582
482
  email?: string;
583
483
  } | undefined;
584
484
  }): Promise<{
585
- user: {
586
- id: string;
587
- name?: string;
588
- email?: string | null;
589
- image?: string;
590
- emailVerified: boolean;
591
- [key: string]: any;
592
- };
593
- data: any;
485
+ user: OAuth2UserInfo & Record<string, unknown>;
486
+ data: HuggingFaceProfile;
594
487
  } | null>;
595
488
  options: HuggingFaceOptions;
596
489
  };
597
490
  slack: (options: SlackOptions) => {
598
491
  id: "slack";
599
492
  name: string;
600
- createAuthorizationURL({
601
- state,
602
- scopes,
603
- redirectURI,
604
- additionalParams
605
- }: {
493
+ accountSubject: ({ profile }: OAuthAccountKeyContext<SlackProfile>) => string;
494
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
606
495
  state: string;
607
496
  codeVerifier: string;
608
497
  scopes?: string[] | undefined;
@@ -612,10 +501,7 @@ declare const socialProviders: {
612
501
  idTokenNonce?: string | undefined;
613
502
  additionalParams?: Record<string, string> | undefined;
614
503
  }): Promise<URL>;
615
- validateAuthorizationCode: ({
616
- code,
617
- redirectURI
618
- }: {
504
+ validateAuthorizationCode: ({ code, redirectURI }: {
619
505
  code: string;
620
506
  redirectURI: string;
621
507
  codeVerifier?: string | undefined;
@@ -632,28 +518,16 @@ declare const socialProviders: {
632
518
  email?: string;
633
519
  } | undefined;
634
520
  }): Promise<{
635
- user: {
636
- id: string;
637
- name?: string;
638
- email?: string | null;
639
- image?: string;
640
- emailVerified: boolean;
641
- [key: string]: any;
642
- };
643
- data: any;
521
+ user: OAuth2UserInfo & Record<string, unknown>;
522
+ data: SlackProfile;
644
523
  } | null>;
645
524
  options: SlackOptions;
646
525
  };
647
526
  spotify: (options: SpotifyOptions) => {
648
527
  id: "spotify";
649
528
  name: string;
650
- createAuthorizationURL({
651
- state,
652
- scopes,
653
- codeVerifier,
654
- redirectURI,
655
- additionalParams
656
- }: {
529
+ accountSubject: ({ profile }: OAuthAccountKeyContext<SpotifyProfile>) => string;
530
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
657
531
  state: string;
658
532
  codeVerifier: string;
659
533
  scopes?: string[] | undefined;
@@ -663,11 +537,7 @@ declare const socialProviders: {
663
537
  idTokenNonce?: string | undefined;
664
538
  additionalParams?: Record<string, string> | undefined;
665
539
  }): Promise<URL>;
666
- validateAuthorizationCode: ({
667
- code,
668
- codeVerifier,
669
- redirectURI
670
- }: {
540
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
671
541
  code: string;
672
542
  redirectURI: string;
673
543
  codeVerifier?: string | undefined;
@@ -684,27 +554,16 @@ declare const socialProviders: {
684
554
  email?: string;
685
555
  } | undefined;
686
556
  }): Promise<{
687
- user: {
688
- id: string;
689
- name?: string;
690
- email?: string | null;
691
- image?: string;
692
- emailVerified: boolean;
693
- [key: string]: any;
694
- };
695
- data: any;
557
+ user: OAuth2UserInfo & Record<string, unknown>;
558
+ data: SpotifyProfile;
696
559
  } | null>;
697
560
  options: SpotifyOptions;
698
561
  };
699
562
  twitch: (options: TwitchOptions) => {
700
563
  id: "twitch";
701
564
  name: string;
702
- createAuthorizationURL({
703
- state,
704
- scopes,
705
- redirectURI,
706
- additionalParams
707
- }: {
565
+ accountSubject: ({ profile }: OAuthAccountKeyContext<TwitchProfile>) => string;
566
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
708
567
  state: string;
709
568
  codeVerifier: string;
710
569
  scopes?: string[] | undefined;
@@ -714,10 +573,7 @@ declare const socialProviders: {
714
573
  idTokenNonce?: string | undefined;
715
574
  additionalParams?: Record<string, string> | undefined;
716
575
  }): Promise<URL>;
717
- validateAuthorizationCode: ({
718
- code,
719
- redirectURI
720
- }: {
576
+ validateAuthorizationCode: ({ code, redirectURI }: {
721
577
  code: string;
722
578
  redirectURI: string;
723
579
  codeVerifier?: string | undefined;
@@ -734,21 +590,15 @@ declare const socialProviders: {
734
590
  email?: string;
735
591
  } | undefined;
736
592
  }): Promise<{
737
- user: {
738
- id: string;
739
- name?: string;
740
- email?: string | null;
741
- image?: string;
742
- emailVerified: boolean;
743
- [key: string]: any;
744
- };
745
- data: any;
593
+ user: OAuth2UserInfo & Record<string, unknown>;
594
+ data: TwitchProfile;
746
595
  } | null>;
747
596
  options: TwitchOptions;
748
597
  };
749
598
  twitter: (options: TwitterOption) => {
750
599
  id: "twitter";
751
600
  name: string;
601
+ accountSubject: ({ profile }: OAuthAccountKeyContext<TwitterProfile>) => string;
752
602
  createAuthorizationURL(data: {
753
603
  state: string;
754
604
  codeVerifier: string;
@@ -759,11 +609,7 @@ declare const socialProviders: {
759
609
  idTokenNonce?: string | undefined;
760
610
  additionalParams?: Record<string, string> | undefined;
761
611
  }): Promise<URL>;
762
- validateAuthorizationCode: ({
763
- code,
764
- codeVerifier,
765
- redirectURI
766
- }: {
612
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
767
613
  code: string;
768
614
  redirectURI: string;
769
615
  codeVerifier?: string | undefined;
@@ -780,28 +626,16 @@ declare const socialProviders: {
780
626
  email?: string;
781
627
  } | undefined;
782
628
  }): Promise<{
783
- user: {
784
- id: string;
785
- name?: string;
786
- email?: string | null;
787
- image?: string;
788
- emailVerified: boolean;
789
- [key: string]: any;
790
- };
791
- data: any;
629
+ user: OAuth2UserInfo & Record<string, unknown>;
630
+ data: TwitterProfile;
792
631
  } | null>;
793
632
  options: TwitterOption;
794
633
  };
795
634
  dropbox: (options: DropboxOptions) => {
796
635
  id: "dropbox";
797
636
  name: string;
798
- createAuthorizationURL: ({
799
- state,
800
- scopes,
801
- codeVerifier,
802
- redirectURI,
803
- additionalParams
804
- }: {
637
+ accountSubject: ({ profile }: OAuthAccountKeyContext<DropboxProfile>) => string;
638
+ createAuthorizationURL: ({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
805
639
  state: string;
806
640
  codeVerifier: string;
807
641
  scopes?: string[] | undefined;
@@ -811,11 +645,7 @@ declare const socialProviders: {
811
645
  idTokenNonce?: string | undefined;
812
646
  additionalParams?: Record<string, string> | undefined;
813
647
  }) => Promise<URL>;
814
- validateAuthorizationCode: ({
815
- code,
816
- codeVerifier,
817
- redirectURI
818
- }: {
648
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
819
649
  code: string;
820
650
  redirectURI: string;
821
651
  codeVerifier?: string | undefined;
@@ -832,28 +662,16 @@ declare const socialProviders: {
832
662
  email?: string;
833
663
  } | undefined;
834
664
  }): Promise<{
835
- user: {
836
- id: string;
837
- name?: string;
838
- email?: string | null;
839
- image?: string;
840
- emailVerified: boolean;
841
- [key: string]: any;
842
- };
843
- data: any;
665
+ user: OAuth2UserInfo & Record<string, unknown>;
666
+ data: DropboxProfile;
844
667
  } | null>;
845
668
  options: DropboxOptions;
846
669
  };
847
670
  kick: (options: KickOptions) => {
848
671
  id: "kick";
849
672
  name: string;
850
- createAuthorizationURL({
851
- state,
852
- scopes,
853
- redirectURI,
854
- codeVerifier,
855
- additionalParams
856
- }: {
673
+ accountSubject: ({ profile }: OAuthAccountKeyContext<KickProfile>) => string;
674
+ createAuthorizationURL({ state, scopes, redirectURI, codeVerifier, additionalParams }: {
857
675
  state: string;
858
676
  codeVerifier: string;
859
677
  scopes?: string[] | undefined;
@@ -863,11 +681,7 @@ declare const socialProviders: {
863
681
  idTokenNonce?: string | undefined;
864
682
  additionalParams?: Record<string, string> | undefined;
865
683
  }): Promise<URL>;
866
- validateAuthorizationCode({
867
- code,
868
- redirectURI,
869
- codeVerifier
870
- }: {
684
+ validateAuthorizationCode({ code, redirectURI, codeVerifier }: {
871
685
  code: string;
872
686
  redirectURI: string;
873
687
  codeVerifier?: string | undefined;
@@ -884,28 +698,16 @@ declare const socialProviders: {
884
698
  email?: string;
885
699
  } | undefined;
886
700
  }): Promise<{
887
- user: {
888
- id: string;
889
- name?: string;
890
- email?: string | null;
891
- image?: string;
892
- emailVerified: boolean;
893
- [key: string]: any;
894
- };
895
- data: any;
701
+ user: OAuth2UserInfo & Record<string, unknown>;
702
+ data: KickProfile;
896
703
  } | null>;
897
704
  options: KickOptions;
898
705
  };
899
706
  linear: (options: LinearOptions) => {
900
707
  id: "linear";
901
708
  name: string;
902
- createAuthorizationURL({
903
- state,
904
- scopes,
905
- loginHint,
906
- redirectURI,
907
- additionalParams
908
- }: {
709
+ accountSubject: ({ profile }: OAuthAccountKeyContext<LinearUser>) => string;
710
+ createAuthorizationURL({ state, scopes, loginHint, redirectURI, additionalParams }: {
909
711
  state: string;
910
712
  codeVerifier: string;
911
713
  scopes?: string[] | undefined;
@@ -915,10 +717,7 @@ declare const socialProviders: {
915
717
  idTokenNonce?: string | undefined;
916
718
  additionalParams?: Record<string, string> | undefined;
917
719
  }): Promise<URL>;
918
- validateAuthorizationCode: ({
919
- code,
920
- redirectURI
921
- }: {
720
+ validateAuthorizationCode: ({ code, redirectURI }: {
922
721
  code: string;
923
722
  redirectURI: string;
924
723
  codeVerifier?: string | undefined;
@@ -935,28 +734,16 @@ declare const socialProviders: {
935
734
  email?: string;
936
735
  } | undefined;
937
736
  }): Promise<{
938
- user: {
939
- id: string;
940
- name?: string;
941
- email?: string | null;
942
- image?: string;
943
- emailVerified: boolean;
944
- [key: string]: any;
945
- };
946
- data: any;
737
+ user: OAuth2UserInfo & Record<string, unknown>;
738
+ data: LinearUser;
947
739
  } | null>;
948
740
  options: LinearOptions;
949
741
  };
950
742
  linkedin: (options: LinkedInOptions) => {
951
743
  id: "linkedin";
952
744
  name: string;
953
- createAuthorizationURL: ({
954
- state,
955
- scopes,
956
- redirectURI,
957
- loginHint,
958
- additionalParams
959
- }: {
745
+ accountSubject: ({ profile }: OAuthAccountKeyContext<LinkedInProfile>) => string;
746
+ createAuthorizationURL: ({ state, scopes, redirectURI, loginHint, additionalParams }: {
960
747
  state: string;
961
748
  codeVerifier: string;
962
749
  scopes?: string[] | undefined;
@@ -966,10 +753,7 @@ declare const socialProviders: {
966
753
  idTokenNonce?: string | undefined;
967
754
  additionalParams?: Record<string, string> | undefined;
968
755
  }) => Promise<URL>;
969
- validateAuthorizationCode: ({
970
- code,
971
- redirectURI
972
- }: {
756
+ validateAuthorizationCode: ({ code, redirectURI }: {
973
757
  code: string;
974
758
  redirectURI: string;
975
759
  codeVerifier?: string | undefined;
@@ -986,29 +770,16 @@ declare const socialProviders: {
986
770
  email?: string;
987
771
  } | undefined;
988
772
  }): Promise<{
989
- user: {
990
- id: string;
991
- name?: string;
992
- email?: string | null;
993
- image?: string;
994
- emailVerified: boolean;
995
- [key: string]: any;
996
- };
997
- data: any;
773
+ user: OAuth2UserInfo & Record<string, unknown>;
774
+ data: LinkedInProfile;
998
775
  } | null>;
999
776
  options: LinkedInOptions;
1000
777
  };
1001
778
  gitlab: (options: GitlabOptions) => {
1002
779
  id: "gitlab";
1003
780
  name: string;
1004
- createAuthorizationURL: ({
1005
- state,
1006
- scopes,
1007
- codeVerifier,
1008
- loginHint,
1009
- redirectURI,
1010
- additionalParams
1011
- }: {
781
+ accountSubject: ({ profile }: OAuthAccountKeyContext<GitlabProfile>) => number;
782
+ createAuthorizationURL: ({ state, scopes, codeVerifier, loginHint, redirectURI, additionalParams }: {
1012
783
  state: string;
1013
784
  codeVerifier: string;
1014
785
  scopes?: string[] | undefined;
@@ -1018,11 +789,7 @@ declare const socialProviders: {
1018
789
  idTokenNonce?: string | undefined;
1019
790
  additionalParams?: Record<string, string> | undefined;
1020
791
  }) => Promise<URL>;
1021
- validateAuthorizationCode: ({
1022
- code,
1023
- redirectURI,
1024
- codeVerifier
1025
- }: {
792
+ validateAuthorizationCode: ({ code, redirectURI, codeVerifier }: {
1026
793
  code: string;
1027
794
  redirectURI: string;
1028
795
  codeVerifier?: string | undefined;
@@ -1039,35 +806,7 @@ declare const socialProviders: {
1039
806
  email?: string;
1040
807
  } | undefined;
1041
808
  }): Promise<{
1042
- user: {
1043
- id: string;
1044
- name?: string;
1045
- email?: string | null;
1046
- image?: string;
1047
- emailVerified: boolean;
1048
- [key: string]: any;
1049
- };
1050
- data: any;
1051
- } | {
1052
- user: {
1053
- id: number;
1054
- name: string;
1055
- email: string;
1056
- image: string;
1057
- emailVerified: boolean;
1058
- } | {
1059
- id: string | number;
1060
- name: string;
1061
- email: string | null;
1062
- image: string;
1063
- emailVerified: boolean;
1064
- } | {
1065
- id: string | number;
1066
- name: string;
1067
- email: string | null;
1068
- image: string;
1069
- emailVerified: boolean;
1070
- };
809
+ user: OAuth2UserInfo & Record<string, unknown>;
1071
810
  data: GitlabProfile;
1072
811
  } | null>;
1073
812
  options: GitlabOptions;
@@ -1075,12 +814,8 @@ declare const socialProviders: {
1075
814
  tiktok: (options: TiktokOptions) => {
1076
815
  id: "tiktok";
1077
816
  name: string;
1078
- createAuthorizationURL({
1079
- state,
1080
- scopes,
1081
- redirectURI,
1082
- additionalParams
1083
- }: {
817
+ accountSubject: ({ profile }: OAuthAccountKeyContext<TiktokProfile>) => string;
818
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1084
819
  state: string;
1085
820
  codeVerifier: string;
1086
821
  scopes?: string[] | undefined;
@@ -1090,10 +825,7 @@ declare const socialProviders: {
1090
825
  idTokenNonce?: string | undefined;
1091
826
  additionalParams?: Record<string, string> | undefined;
1092
827
  }): URL;
1093
- validateAuthorizationCode: ({
1094
- code,
1095
- redirectURI
1096
- }: {
828
+ validateAuthorizationCode: ({ code, redirectURI }: {
1097
829
  code: string;
1098
830
  redirectURI: string;
1099
831
  codeVerifier?: string | undefined;
@@ -1110,27 +842,16 @@ declare const socialProviders: {
1110
842
  email?: string;
1111
843
  } | undefined;
1112
844
  }): Promise<{
1113
- user: {
1114
- id: string;
1115
- name?: string;
1116
- email?: string | null;
1117
- image?: string;
1118
- emailVerified: boolean;
1119
- [key: string]: any;
1120
- };
1121
- data: any;
845
+ user: OAuth2UserInfo & Record<string, unknown>;
846
+ data: TiktokProfile;
1122
847
  } | null>;
1123
848
  options: TiktokOptions;
1124
849
  };
1125
850
  reddit: (options: RedditOptions) => {
1126
851
  id: "reddit";
1127
852
  name: string;
1128
- createAuthorizationURL({
1129
- state,
1130
- scopes,
1131
- redirectURI,
1132
- additionalParams
1133
- }: {
853
+ accountSubject: ({ profile }: OAuthAccountKeyContext<RedditProfile>) => string;
854
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1134
855
  state: string;
1135
856
  codeVerifier: string;
1136
857
  scopes?: string[] | undefined;
@@ -1140,10 +861,7 @@ declare const socialProviders: {
1140
861
  idTokenNonce?: string | undefined;
1141
862
  additionalParams?: Record<string, string> | undefined;
1142
863
  }): Promise<URL>;
1143
- validateAuthorizationCode: ({
1144
- code,
1145
- redirectURI
1146
- }: {
864
+ validateAuthorizationCode: ({ code, redirectURI }: {
1147
865
  code: string;
1148
866
  redirectURI: string;
1149
867
  codeVerifier?: string | undefined;
@@ -1160,27 +878,16 @@ declare const socialProviders: {
1160
878
  email?: string;
1161
879
  } | undefined;
1162
880
  }): Promise<{
1163
- user: {
1164
- id: string;
1165
- name?: string;
1166
- email?: string | null;
1167
- image?: string;
1168
- emailVerified: boolean;
1169
- [key: string]: any;
1170
- };
1171
- data: any;
881
+ user: OAuth2UserInfo & Record<string, unknown>;
882
+ data: RedditProfile;
1172
883
  } | null>;
1173
884
  options: RedditOptions;
1174
885
  };
1175
886
  roblox: (options: RobloxOptions) => {
1176
887
  id: "roblox";
1177
888
  name: string;
1178
- createAuthorizationURL({
1179
- state,
1180
- scopes,
1181
- redirectURI,
1182
- additionalParams
1183
- }: {
889
+ accountSubject: ({ profile }: OAuthAccountKeyContext<RobloxProfile>) => string;
890
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1184
891
  state: string;
1185
892
  codeVerifier: string;
1186
893
  scopes?: string[] | undefined;
@@ -1190,10 +897,7 @@ declare const socialProviders: {
1190
897
  idTokenNonce?: string | undefined;
1191
898
  additionalParams?: Record<string, string> | undefined;
1192
899
  }): Promise<URL>;
1193
- validateAuthorizationCode: ({
1194
- code,
1195
- redirectURI
1196
- }: {
900
+ validateAuthorizationCode: ({ code, redirectURI }: {
1197
901
  code: string;
1198
902
  redirectURI: string;
1199
903
  codeVerifier?: string | undefined;
@@ -1210,28 +914,16 @@ declare const socialProviders: {
1210
914
  email?: string;
1211
915
  } | undefined;
1212
916
  }): Promise<{
1213
- user: {
1214
- id: string;
1215
- name?: string;
1216
- email?: string | null;
1217
- image?: string;
1218
- emailVerified: boolean;
1219
- [key: string]: any;
1220
- };
1221
- data: any;
917
+ user: OAuth2UserInfo & Record<string, unknown>;
918
+ data: RobloxProfile;
1222
919
  } | null>;
1223
920
  options: RobloxOptions;
1224
921
  };
1225
922
  salesforce: (options: SalesforceOptions) => {
1226
923
  id: "salesforce";
1227
924
  name: string;
1228
- createAuthorizationURL({
1229
- state,
1230
- scopes,
1231
- codeVerifier,
1232
- redirectURI,
1233
- additionalParams
1234
- }: {
925
+ accountSubject: ({ profile }: OAuthAccountKeyContext<SalesforceProfile>) => string;
926
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
1235
927
  state: string;
1236
928
  codeVerifier: string;
1237
929
  scopes?: string[] | undefined;
@@ -1241,11 +933,7 @@ declare const socialProviders: {
1241
933
  idTokenNonce?: string | undefined;
1242
934
  additionalParams?: Record<string, string> | undefined;
1243
935
  }): Promise<URL>;
1244
- validateAuthorizationCode: ({
1245
- code,
1246
- codeVerifier,
1247
- redirectURI
1248
- }: {
936
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1249
937
  code: string;
1250
938
  redirectURI: string;
1251
939
  codeVerifier?: string | undefined;
@@ -1262,28 +950,16 @@ declare const socialProviders: {
1262
950
  email?: string;
1263
951
  } | undefined;
1264
952
  }): Promise<{
1265
- user: {
1266
- id: string;
1267
- name?: string;
1268
- email?: string | null;
1269
- image?: string;
1270
- emailVerified: boolean;
1271
- [key: string]: any;
1272
- };
1273
- data: any;
953
+ user: OAuth2UserInfo & Record<string, unknown>;
954
+ data: SalesforceProfile;
1274
955
  } | null>;
1275
956
  options: SalesforceOptions;
1276
957
  };
1277
958
  vk: (options: VkOption) => {
1278
959
  id: "vk";
1279
960
  name: string;
1280
- createAuthorizationURL({
1281
- state,
1282
- scopes,
1283
- codeVerifier,
1284
- redirectURI,
1285
- additionalParams
1286
- }: {
961
+ accountSubject: ({ profile }: OAuthAccountKeyContext<VkProfile>) => string;
962
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
1287
963
  state: string;
1288
964
  codeVerifier: string;
1289
965
  scopes?: string[] | undefined;
@@ -1293,12 +969,7 @@ declare const socialProviders: {
1293
969
  idTokenNonce?: string | undefined;
1294
970
  additionalParams?: Record<string, string> | undefined;
1295
971
  }): Promise<URL>;
1296
- validateAuthorizationCode: ({
1297
- code,
1298
- codeVerifier,
1299
- redirectURI,
1300
- deviceId
1301
- }: {
972
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI, deviceId }: {
1302
973
  code: string;
1303
974
  redirectURI: string;
1304
975
  codeVerifier?: string | undefined;
@@ -1315,27 +986,16 @@ declare const socialProviders: {
1315
986
  email?: string;
1316
987
  } | undefined;
1317
988
  }): Promise<{
1318
- user: {
1319
- id: string;
1320
- name?: string;
1321
- email?: string | null;
1322
- image?: string;
1323
- emailVerified: boolean;
1324
- [key: string]: any;
1325
- };
1326
- data: any;
989
+ user: OAuth2UserInfo & Record<string, unknown>;
990
+ data: VkProfile;
1327
991
  } | null>;
1328
992
  options: VkOption;
1329
993
  };
1330
994
  zoom: (userOptions: ZoomOptions) => {
1331
995
  id: "zoom";
1332
996
  name: string;
1333
- createAuthorizationURL: ({
1334
- state,
1335
- redirectURI,
1336
- codeVerifier,
1337
- additionalParams
1338
- }: {
997
+ accountSubject: ({ profile }: OAuthAccountKeyContext<ZoomProfile>) => string;
998
+ createAuthorizationURL: ({ state, redirectURI, codeVerifier, additionalParams }: {
1339
999
  state: string;
1340
1000
  codeVerifier: string;
1341
1001
  scopes?: string[] | undefined;
@@ -1345,11 +1005,7 @@ declare const socialProviders: {
1345
1005
  idTokenNonce?: string | undefined;
1346
1006
  additionalParams?: Record<string, string> | undefined;
1347
1007
  }) => Promise<URL>;
1348
- validateAuthorizationCode: ({
1349
- code,
1350
- redirectURI,
1351
- codeVerifier
1352
- }: {
1008
+ validateAuthorizationCode: ({ code, redirectURI, codeVerifier }: {
1353
1009
  code: string;
1354
1010
  redirectURI: string;
1355
1011
  codeVerifier?: string | undefined;
@@ -1366,27 +1022,15 @@ declare const socialProviders: {
1366
1022
  email?: string;
1367
1023
  } | undefined;
1368
1024
  }): Promise<{
1369
- user: {
1370
- id: string;
1371
- name?: string;
1372
- email?: string | null;
1373
- image?: string;
1374
- emailVerified: boolean;
1375
- [key: string]: any;
1376
- };
1377
- data: any;
1025
+ user: OAuth2UserInfo & Record<string, unknown>;
1026
+ data: ZoomProfile;
1378
1027
  } | null>;
1379
1028
  };
1380
1029
  notion: (options: NotionOptions) => {
1381
1030
  id: "notion";
1382
1031
  name: string;
1383
- createAuthorizationURL({
1384
- state,
1385
- scopes,
1386
- loginHint,
1387
- redirectURI,
1388
- additionalParams
1389
- }: {
1032
+ accountSubject: ({ profile }: OAuthAccountKeyContext<NotionProfile>) => string;
1033
+ createAuthorizationURL({ state, scopes, loginHint, redirectURI, additionalParams }: {
1390
1034
  state: string;
1391
1035
  codeVerifier: string;
1392
1036
  scopes?: string[] | undefined;
@@ -1396,10 +1040,7 @@ declare const socialProviders: {
1396
1040
  idTokenNonce?: string | undefined;
1397
1041
  additionalParams?: Record<string, string> | undefined;
1398
1042
  }): Promise<URL>;
1399
- validateAuthorizationCode: ({
1400
- code,
1401
- redirectURI
1402
- }: {
1043
+ validateAuthorizationCode: ({ code, redirectURI }: {
1403
1044
  code: string;
1404
1045
  redirectURI: string;
1405
1046
  codeVerifier?: string | undefined;
@@ -1416,27 +1057,16 @@ declare const socialProviders: {
1416
1057
  email?: string;
1417
1058
  } | undefined;
1418
1059
  }): Promise<{
1419
- user: {
1420
- id: string;
1421
- name?: string;
1422
- email?: string | null;
1423
- image?: string;
1424
- emailVerified: boolean;
1425
- [key: string]: any;
1426
- };
1427
- data: any;
1060
+ user: OAuth2UserInfo & Record<string, unknown>;
1061
+ data: NotionProfile;
1428
1062
  } | null>;
1429
1063
  options: NotionOptions;
1430
1064
  };
1431
1065
  kakao: (options: KakaoOptions) => {
1432
1066
  id: "kakao";
1433
1067
  name: string;
1434
- createAuthorizationURL({
1435
- state,
1436
- scopes,
1437
- redirectURI,
1438
- additionalParams
1439
- }: {
1068
+ accountSubject: ({ profile }: OAuthAccountKeyContext<KakaoProfile>) => number;
1069
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1440
1070
  state: string;
1441
1071
  codeVerifier: string;
1442
1072
  scopes?: string[] | undefined;
@@ -1446,10 +1076,7 @@ declare const socialProviders: {
1446
1076
  idTokenNonce?: string | undefined;
1447
1077
  additionalParams?: Record<string, string> | undefined;
1448
1078
  }): Promise<URL>;
1449
- validateAuthorizationCode: ({
1450
- code,
1451
- redirectURI
1452
- }: {
1079
+ validateAuthorizationCode: ({ code, redirectURI }: {
1453
1080
  code: string;
1454
1081
  redirectURI: string;
1455
1082
  codeVerifier?: string | undefined;
@@ -1466,30 +1093,11 @@ declare const socialProviders: {
1466
1093
  email?: string;
1467
1094
  } | undefined;
1468
1095
  }): Promise<{
1469
- user: {
1470
- id: string;
1471
- name?: string;
1472
- email?: string | null;
1473
- image?: string;
1474
- emailVerified: boolean;
1475
- [key: string]: any;
1476
- };
1477
- data: any;
1096
+ user: OAuth2UserInfo & Record<string, unknown>;
1097
+ data: KakaoProfile;
1478
1098
  } | {
1479
1099
  user: {
1480
- id: string;
1481
- name: string;
1482
- email: string | undefined;
1483
- image: string | undefined;
1484
- emailVerified: boolean;
1485
- } | {
1486
- id: string;
1487
- name: string;
1488
- email: string | null;
1489
- image: string;
1490
- emailVerified: boolean;
1491
- } | {
1492
- id: string;
1100
+ id?: never;
1493
1101
  name: string;
1494
1102
  email: string | null;
1495
1103
  image: string;
@@ -1502,12 +1110,8 @@ declare const socialProviders: {
1502
1110
  naver: (options: NaverOptions) => {
1503
1111
  id: "naver";
1504
1112
  name: string;
1505
- createAuthorizationURL({
1506
- state,
1507
- scopes,
1508
- redirectURI,
1509
- additionalParams
1510
- }: {
1113
+ accountSubject: ({ profile }: OAuthAccountKeyContext<NaverProfile>) => string;
1114
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1511
1115
  state: string;
1512
1116
  codeVerifier: string;
1513
1117
  scopes?: string[] | undefined;
@@ -1517,10 +1121,7 @@ declare const socialProviders: {
1517
1121
  idTokenNonce?: string | undefined;
1518
1122
  additionalParams?: Record<string, string> | undefined;
1519
1123
  }): Promise<URL>;
1520
- validateAuthorizationCode: ({
1521
- code,
1522
- redirectURI
1523
- }: {
1124
+ validateAuthorizationCode: ({ code, redirectURI }: {
1524
1125
  code: string;
1525
1126
  redirectURI: string;
1526
1127
  codeVerifier?: string | undefined;
@@ -1537,30 +1138,11 @@ declare const socialProviders: {
1537
1138
  email?: string;
1538
1139
  } | undefined;
1539
1140
  }): Promise<{
1540
- user: {
1541
- id: string;
1542
- name?: string;
1543
- email?: string | null;
1544
- image?: string;
1545
- emailVerified: boolean;
1546
- [key: string]: any;
1547
- };
1548
- data: any;
1141
+ user: OAuth2UserInfo & Record<string, unknown>;
1142
+ data: NaverProfile;
1549
1143
  } | {
1550
1144
  user: {
1551
- id: string;
1552
- name: string;
1553
- email: string;
1554
- image: string;
1555
- emailVerified: boolean;
1556
- } | {
1557
- id: string;
1558
- name: string;
1559
- email: string | null;
1560
- image: string;
1561
- emailVerified: boolean;
1562
- } | {
1563
- id: string;
1145
+ id?: never;
1564
1146
  name: string;
1565
1147
  email: string | null;
1566
1148
  image: string;
@@ -1573,14 +1155,9 @@ declare const socialProviders: {
1573
1155
  line: (options: LineOptions) => {
1574
1156
  id: "line";
1575
1157
  name: string;
1576
- createAuthorizationURL({
1577
- state,
1578
- scopes,
1579
- codeVerifier,
1580
- redirectURI,
1581
- loginHint,
1582
- additionalParams
1583
- }: {
1158
+ accountSubject: ({ profile }: OAuthAccountKeyContext<LineIdTokenPayload | LineUserInfo>) => string;
1159
+ accountIssuer: string;
1160
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint, additionalParams }: {
1584
1161
  state: string;
1585
1162
  codeVerifier: string;
1586
1163
  scopes?: string[] | undefined;
@@ -1590,11 +1167,7 @@ declare const socialProviders: {
1590
1167
  idTokenNonce?: string | undefined;
1591
1168
  additionalParams?: Record<string, string> | undefined;
1592
1169
  }): Promise<URL>;
1593
- validateAuthorizationCode: ({
1594
- code,
1595
- codeVerifier,
1596
- redirectURI
1597
- }: {
1170
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1598
1171
  code: string;
1599
1172
  redirectURI: string;
1600
1173
  codeVerifier?: string | undefined;
@@ -1614,50 +1187,17 @@ declare const socialProviders: {
1614
1187
  email?: string;
1615
1188
  } | undefined;
1616
1189
  }): Promise<{
1617
- user: {
1618
- id: string;
1619
- name?: string;
1620
- email?: string | null;
1621
- image?: string;
1622
- emailVerified: boolean;
1623
- [key: string]: any;
1624
- };
1625
- data: any;
1626
- } | {
1627
- user: {
1628
- id: any;
1629
- name: any;
1630
- email: any;
1631
- image: any;
1632
- emailVerified: false;
1633
- } | {
1634
- id: any;
1635
- name: any;
1636
- email: any;
1637
- image: any;
1638
- emailVerified: boolean;
1639
- } | {
1640
- id: any;
1641
- name: any;
1642
- email: any;
1643
- image: any;
1644
- emailVerified: boolean;
1645
- };
1646
- data: any;
1190
+ user: OAuth2UserInfo & Record<string, unknown>;
1191
+ data: LineIdTokenPayload | LineUserInfo;
1647
1192
  } | null>;
1648
1193
  options: LineOptions;
1649
1194
  };
1650
1195
  paybin: (options: PaybinOptions) => {
1651
1196
  id: "paybin";
1652
1197
  name: string;
1653
- createAuthorizationURL({
1654
- state,
1655
- scopes,
1656
- codeVerifier,
1657
- redirectURI,
1658
- loginHint,
1659
- additionalParams
1660
- }: {
1198
+ accountSubject: ({ profile }: OAuthAccountKeyContext<PaybinProfile>) => string;
1199
+ accountIssuer: string;
1200
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint, additionalParams }: {
1661
1201
  state: string;
1662
1202
  codeVerifier: string;
1663
1203
  scopes?: string[] | undefined;
@@ -1667,11 +1207,7 @@ declare const socialProviders: {
1667
1207
  idTokenNonce?: string | undefined;
1668
1208
  additionalParams?: Record<string, string> | undefined;
1669
1209
  }): Promise<URL>;
1670
- validateAuthorizationCode: ({
1671
- code,
1672
- codeVerifier,
1673
- redirectURI
1674
- }: {
1210
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1675
1211
  code: string;
1676
1212
  redirectURI: string;
1677
1213
  codeVerifier?: string | undefined;
@@ -1688,27 +1224,16 @@ declare const socialProviders: {
1688
1224
  email?: string;
1689
1225
  } | undefined;
1690
1226
  }): Promise<{
1691
- user: {
1692
- id: string;
1693
- name?: string;
1694
- email?: string | null;
1695
- image?: string;
1696
- emailVerified: boolean;
1697
- [key: string]: any;
1698
- };
1699
- data: any;
1227
+ user: OAuth2UserInfo & Record<string, unknown>;
1228
+ data: PaybinProfile;
1700
1229
  } | null>;
1701
1230
  options: PaybinOptions;
1702
1231
  };
1703
1232
  paypal: (options: PayPalOptions) => {
1704
1233
  id: "paypal";
1705
1234
  name: string;
1706
- createAuthorizationURL({
1707
- state,
1708
- codeVerifier,
1709
- redirectURI,
1710
- additionalParams
1711
- }: {
1235
+ accountSubject: ({ profile }: OAuthAccountKeyContext<PayPalProfile>) => string;
1236
+ createAuthorizationURL({ state, codeVerifier, redirectURI, additionalParams }: {
1712
1237
  state: string;
1713
1238
  codeVerifier: string;
1714
1239
  scopes?: string[] | undefined;
@@ -1718,10 +1243,7 @@ declare const socialProviders: {
1718
1243
  idTokenNonce?: string | undefined;
1719
1244
  additionalParams?: Record<string, string> | undefined;
1720
1245
  }): Promise<URL>;
1721
- validateAuthorizationCode: ({
1722
- code,
1723
- redirectURI
1724
- }: {
1246
+ validateAuthorizationCode: ({ code, redirectURI }: {
1725
1247
  code: string;
1726
1248
  redirectURI: string;
1727
1249
  codeVerifier?: string | undefined;
@@ -1747,30 +1269,11 @@ declare const socialProviders: {
1747
1269
  email?: string;
1748
1270
  } | undefined;
1749
1271
  }): Promise<{
1750
- user: {
1751
- id: string;
1752
- name?: string;
1753
- email?: string | null;
1754
- image?: string;
1755
- emailVerified: boolean;
1756
- [key: string]: any;
1757
- };
1758
- data: any;
1272
+ user: OAuth2UserInfo & Record<string, unknown>;
1273
+ data: PayPalProfile;
1759
1274
  } | {
1760
1275
  user: {
1761
- id: string;
1762
- name: string;
1763
- email: string;
1764
- image: string | undefined;
1765
- emailVerified: boolean;
1766
- } | {
1767
- id: string;
1768
- name: string;
1769
- email: string | null;
1770
- image: string;
1771
- emailVerified: boolean;
1772
- } | {
1773
- id: string;
1276
+ id?: never;
1774
1277
  name: string;
1775
1278
  email: string | null;
1776
1279
  image: string;
@@ -1783,13 +1286,8 @@ declare const socialProviders: {
1783
1286
  polar: (options: PolarOptions) => {
1784
1287
  id: "polar";
1785
1288
  name: string;
1786
- createAuthorizationURL({
1787
- state,
1788
- scopes,
1789
- codeVerifier,
1790
- redirectURI,
1791
- additionalParams
1792
- }: {
1289
+ accountSubject: ({ profile }: OAuthAccountKeyContext<PolarProfile>) => string;
1290
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
1793
1291
  state: string;
1794
1292
  codeVerifier: string;
1795
1293
  scopes?: string[] | undefined;
@@ -1799,11 +1297,7 @@ declare const socialProviders: {
1799
1297
  idTokenNonce?: string | undefined;
1800
1298
  additionalParams?: Record<string, string> | undefined;
1801
1299
  }): Promise<URL>;
1802
- validateAuthorizationCode: ({
1803
- code,
1804
- codeVerifier,
1805
- redirectURI
1806
- }: {
1300
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1807
1301
  code: string;
1808
1302
  redirectURI: string;
1809
1303
  codeVerifier?: string | undefined;
@@ -1820,28 +1314,16 @@ declare const socialProviders: {
1820
1314
  email?: string;
1821
1315
  } | undefined;
1822
1316
  }): Promise<{
1823
- user: {
1824
- id: string;
1825
- name?: string;
1826
- email?: string | null;
1827
- image?: string;
1828
- emailVerified: boolean;
1829
- [key: string]: any;
1830
- };
1831
- data: any;
1317
+ user: OAuth2UserInfo & Record<string, unknown>;
1318
+ data: PolarProfile;
1832
1319
  } | null>;
1833
1320
  options: PolarOptions;
1834
1321
  };
1835
1322
  railway: (options: RailwayOptions) => {
1836
1323
  id: "railway";
1837
1324
  name: string;
1838
- createAuthorizationURL({
1839
- state,
1840
- scopes,
1841
- codeVerifier,
1842
- redirectURI,
1843
- additionalParams
1844
- }: {
1325
+ accountSubject: ({ profile }: OAuthAccountKeyContext<RailwayProfile>) => string;
1326
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
1845
1327
  state: string;
1846
1328
  codeVerifier: string;
1847
1329
  scopes?: string[] | undefined;
@@ -1851,11 +1333,7 @@ declare const socialProviders: {
1851
1333
  idTokenNonce?: string | undefined;
1852
1334
  additionalParams?: Record<string, string> | undefined;
1853
1335
  }): Promise<URL>;
1854
- validateAuthorizationCode: ({
1855
- code,
1856
- codeVerifier,
1857
- redirectURI
1858
- }: {
1336
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1859
1337
  code: string;
1860
1338
  redirectURI: string;
1861
1339
  codeVerifier?: string | undefined;
@@ -1872,28 +1350,16 @@ declare const socialProviders: {
1872
1350
  email?: string;
1873
1351
  } | undefined;
1874
1352
  }): Promise<{
1875
- user: {
1876
- id: string;
1877
- name?: string;
1878
- email?: string | null;
1879
- image?: string;
1880
- emailVerified: boolean;
1881
- [key: string]: any;
1882
- };
1883
- data: any;
1353
+ user: OAuth2UserInfo & Record<string, unknown>;
1354
+ data: RailwayProfile;
1884
1355
  } | null>;
1885
1356
  options: RailwayOptions;
1886
1357
  };
1887
1358
  vercel: (options: VercelOptions) => {
1888
1359
  id: "vercel";
1889
1360
  name: string;
1890
- createAuthorizationURL({
1891
- state,
1892
- scopes,
1893
- codeVerifier,
1894
- redirectURI,
1895
- additionalParams
1896
- }: {
1361
+ accountSubject: ({ profile }: OAuthAccountKeyContext<VercelProfile>) => string;
1362
+ createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
1897
1363
  state: string;
1898
1364
  codeVerifier: string;
1899
1365
  scopes?: string[] | undefined;
@@ -1903,11 +1369,7 @@ declare const socialProviders: {
1903
1369
  idTokenNonce?: string | undefined;
1904
1370
  additionalParams?: Record<string, string> | undefined;
1905
1371
  }): Promise<URL>;
1906
- validateAuthorizationCode: ({
1907
- code,
1908
- codeVerifier,
1909
- redirectURI
1910
- }: {
1372
+ validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
1911
1373
  code: string;
1912
1374
  redirectURI: string;
1913
1375
  codeVerifier?: string | undefined;
@@ -1923,27 +1385,16 @@ declare const socialProviders: {
1923
1385
  email?: string;
1924
1386
  } | undefined;
1925
1387
  }): Promise<{
1926
- user: {
1927
- id: string;
1928
- name?: string;
1929
- email?: string | null;
1930
- image?: string;
1931
- emailVerified: boolean;
1932
- [key: string]: any;
1933
- };
1934
- data: any;
1388
+ user: OAuth2UserInfo & Record<string, unknown>;
1389
+ data: VercelProfile;
1935
1390
  } | null>;
1936
1391
  options: VercelOptions;
1937
1392
  };
1938
1393
  wechat: (options: WeChatOptions) => {
1939
1394
  id: "wechat";
1940
1395
  name: string;
1941
- createAuthorizationURL({
1942
- state,
1943
- scopes,
1944
- redirectURI,
1945
- additionalParams
1946
- }: {
1396
+ accountSubject: ({ profile }: OAuthAccountKeyContext<WeChatProfile>) => string;
1397
+ createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
1947
1398
  state: string;
1948
1399
  codeVerifier: string;
1949
1400
  scopes?: string[] | undefined;
@@ -1953,9 +1404,7 @@ declare const socialProviders: {
1953
1404
  idTokenNonce?: string | undefined;
1954
1405
  additionalParams?: Record<string, string> | undefined;
1955
1406
  }): URL;
1956
- validateAuthorizationCode: ({
1957
- code
1958
- }: {
1407
+ validateAuthorizationCode: ({ code }: {
1959
1408
  code: string;
1960
1409
  redirectURI: string;
1961
1410
  codeVerifier?: string | undefined;
@@ -1986,15 +1435,8 @@ declare const socialProviders: {
1986
1435
  email?: string;
1987
1436
  } | undefined;
1988
1437
  }): Promise<{
1989
- user: {
1990
- id: string;
1991
- name?: string;
1992
- email?: string | null;
1993
- image?: string;
1994
- emailVerified: boolean;
1995
- [key: string]: any;
1996
- };
1997
- data: any;
1438
+ user: OAuth2UserInfo & Record<string, unknown>;
1439
+ data: WeChatProfile;
1998
1440
  } | null>;
1999
1441
  options: WeChatOptions;
2000
1442
  };
@@ -2004,7 +1446,7 @@ declare const SocialProviderListEnum: z.ZodType<SocialProviderList[number] | (st
2004
1446
  type SocialProvider = z.infer<typeof SocialProviderListEnum>;
2005
1447
  type SocialProviders = { [K in SocialProviderList[number]]?: AwaitableFunction<Parameters<(typeof socialProviders)[K]>[0] & {
2006
1448
  enabled?: boolean | undefined;
2007
- }> };
1449
+ }>; };
2008
1450
  type SocialProviderList = typeof socialProviderList;
2009
1451
  //#endregion
2010
- export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RailwayOptions, RailwayProfile, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VercelOptions, VercelProfile, VerifyGoogleIdTokenOptions, VkOption, VkProfile, WeChatOptions, WeChatProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, getMicrosoftPublicKey, github, gitlab, google, huggingface, isGoogleHostedDomainAllowed, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, railway, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, verifyGoogleIdToken, vk, wechat, zoom };
1452
+ export { AccountStatus, AppleNonConformUser, AppleOptions, AppleProfile, AtlassianOptions, AtlassianProfile, CognitoOptions, CognitoProfile, DiscordOptions, DiscordProfile, DropboxOptions, DropboxProfile, FacebookGraphProfile, FacebookLimitedLoginProfile, FacebookOptions, FacebookProfile, FigmaOptions, FigmaProfile, GithubOptions, GithubProfile, GitlabOptions, GitlabProfile, GoogleOptions, GoogleProfile, HuggingFaceOptions, HuggingFaceProfile, KakaoOptions, KakaoProfile, KickOptions, KickProfile, LineIdTokenPayload, LineOptions, LineUserInfo, LinearOptions, LinearProfile, LinearUser, LinkedInOptions, LinkedInProfile, LoginType, MicrosoftEntraIDProfile, MicrosoftOptions, NaverOptions, NaverProfile, NotionOptions, NotionProfile, PayPalOptions, PayPalProfile, PayPalTokenResponse, PaybinOptions, PaybinProfile, PhoneNumber, PolarOptions, PolarProfile, PronounOption, RailwayOptions, RailwayProfile, RedditOptions, RedditProfile, RobloxOptions, RobloxProfile, SalesforceOptions, SalesforceProfile, SlackOptions, SlackProfile, SocialProvider, SocialProviderList, SocialProviderListEnum, SocialProviders, SpotifyOptions, SpotifyProfile, TiktokOptions, TiktokProfile, TwitchOptions, TwitchProfile, TwitterOption, TwitterProfile, VercelOptions, VercelProfile, VerifyGoogleIdTokenOptions, VkOption, VkProfile, WeChatOptions, WeChatProfile, ZoomOptions, ZoomProfile, apple, atlassian, cognito, discord, dropbox, facebook, figma, getApplePublicKey, getCognitoPublicKey, getGooglePublicKey, getMicrosoftPublicKey, github, gitlab, google, huggingface, isGoogleHostedDomainAllowed, kakao, kick, line, linear, linkedin, microsoft, naver, notion, paybin, paypal, polar, railway, reddit, roblox, salesforce, slack, socialProviderList, socialProviders, spotify, tiktok, twitch, twitter, vercel, verifyGoogleIdToken, vk, wechat, zoom };