@better-auth/core 1.7.0-rc.4 → 1.7.0-rc.6

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 (113) hide show
  1. package/dist/api/index.d.mts +39 -60
  2. package/dist/api/index.mjs +39 -26
  3. package/dist/async_hooks/index.d.mts +1 -0
  4. package/dist/async_hooks/pure.index.d.mts +1 -0
  5. package/dist/context/endpoint-context.d.mts +1 -1
  6. package/dist/context/global.d.mts +1 -0
  7. package/dist/context/global.mjs +1 -1
  8. package/dist/context/request-state.d.mts +1 -0
  9. package/dist/context/transaction.d.mts +2 -3
  10. package/dist/db/adapter/factory.d.mts +5 -3
  11. package/dist/db/adapter/factory.mjs +1 -1
  12. package/dist/db/adapter/get-default-field-name.d.mts +9 -2
  13. package/dist/db/adapter/get-default-model-name.d.mts +5 -1
  14. package/dist/db/adapter/get-field-attributes.d.mts +11 -4
  15. package/dist/db/adapter/get-field-name.d.mts +9 -2
  16. package/dist/db/adapter/get-id-field.d.mts +12 -4
  17. package/dist/db/adapter/get-model-name.d.mts +5 -1
  18. package/dist/db/adapter/index.d.mts +32 -7
  19. package/dist/db/adapter/types.d.mts +17 -5
  20. package/dist/db/adapter/utils.d.mts +1 -0
  21. package/dist/db/database-index.d.mts +12 -2
  22. package/dist/db/get-tables.d.mts +0 -1
  23. package/dist/db/plugin.d.mts +3 -3
  24. package/dist/db/schema/account.d.mts +1 -1
  25. package/dist/db/schema/rate-limit.d.mts +1 -1
  26. package/dist/db/schema/session.d.mts +1 -1
  27. package/dist/db/schema/shared.d.mts +1 -0
  28. package/dist/db/schema/user.d.mts +1 -1
  29. package/dist/db/schema/verification.d.mts +1 -1
  30. package/dist/db/type.d.mts +11 -8
  31. package/dist/env/logger.d.mts +25 -25
  32. package/dist/error/codes.d.mts +1 -0
  33. package/dist/error/index.d.mts +1 -0
  34. package/dist/index.d.mts +1 -1
  35. package/dist/instrumentation/attributes.d.mts +1 -0
  36. package/dist/instrumentation/pure.index.d.mts +1 -0
  37. package/dist/instrumentation/tracer.mjs +1 -1
  38. package/dist/oauth2/authorization-params.d.mts +1 -0
  39. package/dist/oauth2/client-assertion.d.mts +13 -3
  40. package/dist/oauth2/client-credentials-token.d.mts +17 -3
  41. package/dist/oauth2/create-authorization-url.d.mts +21 -3
  42. package/dist/oauth2/dpop.d.mts +23 -2
  43. package/dist/oauth2/dpop.mjs +1 -1
  44. package/dist/oauth2/oauth-provider.d.mts +7 -13
  45. package/dist/oauth2/refresh-access-token.d.mts +19 -3
  46. package/dist/oauth2/refresh-access-token.mjs +1 -1
  47. package/dist/oauth2/reject-redirects.mjs +1 -1
  48. package/dist/oauth2/token-endpoint-auth.d.mts +1 -0
  49. package/dist/oauth2/utils.d.mts +1 -0
  50. package/dist/oauth2/utils.mjs +1 -1
  51. package/dist/oauth2/validate-authorization-code.d.mts +29 -5
  52. package/dist/oauth2/verify-id-token.d.mts +1 -1
  53. package/dist/oauth2/verify.d.mts +7 -5
  54. package/dist/oauth2/verify.mjs +2 -2
  55. package/dist/social-providers/apple.d.mts +18 -5
  56. package/dist/social-providers/atlassian.d.mts +15 -4
  57. package/dist/social-providers/cognito.d.mts +18 -5
  58. package/dist/social-providers/discord.d.mts +13 -4
  59. package/dist/social-providers/dropbox.d.mts +15 -4
  60. package/dist/social-providers/facebook.d.mts +18 -6
  61. package/dist/social-providers/figma.d.mts +15 -4
  62. package/dist/social-providers/github.d.mts +16 -4
  63. package/dist/social-providers/gitlab.d.mts +16 -4
  64. package/dist/social-providers/google.d.mts +25 -6
  65. package/dist/social-providers/huggingface.d.mts +15 -4
  66. package/dist/social-providers/index.d.mts +504 -113
  67. package/dist/social-providers/kakao.d.mts +13 -4
  68. package/dist/social-providers/kick.d.mts +15 -4
  69. package/dist/social-providers/line.d.mts +16 -4
  70. package/dist/social-providers/linear.d.mts +14 -4
  71. package/dist/social-providers/linkedin.d.mts +14 -4
  72. package/dist/social-providers/microsoft-entra-id.d.mts +14 -5
  73. package/dist/social-providers/microsoft-entra-id.mjs +1 -2
  74. package/dist/social-providers/naver.d.mts +22 -23
  75. package/dist/social-providers/notion.d.mts +14 -4
  76. package/dist/social-providers/paybin.d.mts +16 -4
  77. package/dist/social-providers/paypal.d.mts +13 -4
  78. package/dist/social-providers/polar.d.mts +15 -4
  79. package/dist/social-providers/railway.d.mts +15 -4
  80. package/dist/social-providers/reddit.d.mts +13 -4
  81. package/dist/social-providers/roblox.d.mts +13 -4
  82. package/dist/social-providers/salesforce.d.mts +15 -4
  83. package/dist/social-providers/slack.d.mts +13 -4
  84. package/dist/social-providers/spotify.d.mts +15 -4
  85. package/dist/social-providers/tiktok.d.mts +14 -6
  86. package/dist/social-providers/twitch.d.mts +13 -4
  87. package/dist/social-providers/twitter.d.mts +19 -26
  88. package/dist/social-providers/vercel.d.mts +15 -4
  89. package/dist/social-providers/vk.d.mts +16 -4
  90. package/dist/social-providers/wechat.d.mts +12 -4
  91. package/dist/social-providers/zoom.d.mts +18 -6
  92. package/dist/types/context.d.mts +2 -2
  93. package/dist/types/cookie.d.mts +1 -1
  94. package/dist/types/helper.d.mts +1 -1
  95. package/dist/types/index.d.mts +1 -1
  96. package/dist/types/init-options.d.mts +18 -26
  97. package/dist/types/plugin-client.d.mts +3 -1
  98. package/dist/types/plugin.d.mts +2 -2
  99. package/dist/utils/async.d.mts +1 -0
  100. package/dist/utils/db.d.mts +0 -1
  101. package/dist/utils/deprecate.d.mts +1 -0
  102. package/dist/utils/email.d.mts +4 -1
  103. package/dist/utils/error-codes.d.mts +2 -2
  104. package/dist/utils/host.d.mts +1 -27
  105. package/dist/utils/host.mjs +1 -1
  106. package/dist/utils/ip.d.mts +0 -1
  107. package/dist/utils/ip.mjs +1 -1
  108. package/dist/utils/is-api-error.d.mts +1 -0
  109. package/dist/utils/redirect-uri.d.mts +1 -0
  110. package/package.json +4 -4
  111. package/src/api/index.ts +96 -95
  112. package/src/db/type.ts +2 -1
  113. package/src/types/init-options.ts +6 -4
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/kakao.d.ts
4
3
  interface Partner {
5
4
  /** Partner-specific ID (consent required: kakaotalk_message) */
@@ -94,8 +93,15 @@ interface KakaoOptions extends ProviderOptions<KakaoProfile> {
94
93
  declare const kakao: (options: KakaoOptions) => {
95
94
  id: "kakao";
96
95
  name: string;
97
- accountSubject: ({ profile }: OAuthAccountKeyContext<KakaoProfile>) => number;
98
- createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
96
+ accountSubject: ({
97
+ profile
98
+ }: OAuthAccountKeyContext<KakaoProfile>) => number;
99
+ createAuthorizationURL({
100
+ state,
101
+ scopes,
102
+ redirectURI,
103
+ additionalParams
104
+ }: {
99
105
  state: string;
100
106
  codeVerifier: string;
101
107
  scopes?: string[] | undefined;
@@ -105,7 +111,10 @@ declare const kakao: (options: KakaoOptions) => {
105
111
  idTokenNonce?: string | undefined;
106
112
  additionalParams?: Record<string, string> | undefined;
107
113
  }): Promise<URL>;
108
- validateAuthorizationCode: ({ code, redirectURI }: {
114
+ validateAuthorizationCode: ({
115
+ code,
116
+ redirectURI
117
+ }: {
109
118
  code: string;
110
119
  redirectURI: string;
111
120
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/kick.d.ts
4
3
  interface KickProfile {
5
4
  /**
@@ -25,8 +24,16 @@ interface KickOptions extends ProviderOptions<KickProfile> {
25
24
  declare const kick: (options: KickOptions) => {
26
25
  id: "kick";
27
26
  name: string;
28
- accountSubject: ({ profile }: OAuthAccountKeyContext<KickProfile>) => string;
29
- createAuthorizationURL({ state, scopes, redirectURI, codeVerifier, additionalParams }: {
27
+ accountSubject: ({
28
+ profile
29
+ }: OAuthAccountKeyContext<KickProfile>) => string;
30
+ createAuthorizationURL({
31
+ state,
32
+ scopes,
33
+ redirectURI,
34
+ codeVerifier,
35
+ additionalParams
36
+ }: {
30
37
  state: string;
31
38
  codeVerifier: string;
32
39
  scopes?: string[] | undefined;
@@ -36,7 +43,11 @@ declare const kick: (options: KickOptions) => {
36
43
  idTokenNonce?: string | undefined;
37
44
  additionalParams?: Record<string, string> | undefined;
38
45
  }): Promise<URL>;
39
- validateAuthorizationCode({ code, redirectURI, codeVerifier }: {
46
+ validateAuthorizationCode({
47
+ code,
48
+ redirectURI,
49
+ codeVerifier
50
+ }: {
40
51
  code: string;
41
52
  redirectURI: string;
42
53
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/line.d.ts
4
3
  interface LineIdTokenPayload {
5
4
  iss: string;
@@ -34,9 +33,18 @@ interface LineOptions extends ProviderOptions<LineUserInfo | LineIdTokenPayload>
34
33
  declare const line: (options: LineOptions) => {
35
34
  id: "line";
36
35
  name: string;
37
- accountSubject: ({ profile }: OAuthAccountKeyContext<LineIdTokenPayload | LineUserInfo>) => string;
36
+ accountSubject: ({
37
+ profile
38
+ }: OAuthAccountKeyContext<LineIdTokenPayload | LineUserInfo>) => string;
38
39
  accountIssuer: string;
39
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint, additionalParams }: {
40
+ createAuthorizationURL({
41
+ state,
42
+ scopes,
43
+ codeVerifier,
44
+ redirectURI,
45
+ loginHint,
46
+ additionalParams
47
+ }: {
40
48
  state: string;
41
49
  codeVerifier: string;
42
50
  scopes?: string[] | undefined;
@@ -46,7 +54,11 @@ declare const line: (options: LineOptions) => {
46
54
  idTokenNonce?: string | undefined;
47
55
  additionalParams?: Record<string, string> | undefined;
48
56
  }): Promise<URL>;
49
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
57
+ validateAuthorizationCode: ({
58
+ code,
59
+ codeVerifier,
60
+ redirectURI
61
+ }: {
50
62
  code: string;
51
63
  redirectURI: string;
52
64
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/linear.d.ts
4
3
  interface LinearUser {
5
4
  id: string;
@@ -21,8 +20,16 @@ interface LinearOptions extends ProviderOptions<LinearUser> {
21
20
  declare const linear: (options: LinearOptions) => {
22
21
  id: "linear";
23
22
  name: string;
24
- accountSubject: ({ profile }: OAuthAccountKeyContext<LinearUser>) => string;
25
- createAuthorizationURL({ state, scopes, loginHint, redirectURI, additionalParams }: {
23
+ accountSubject: ({
24
+ profile
25
+ }: OAuthAccountKeyContext<LinearUser>) => string;
26
+ createAuthorizationURL({
27
+ state,
28
+ scopes,
29
+ loginHint,
30
+ redirectURI,
31
+ additionalParams
32
+ }: {
26
33
  state: string;
27
34
  codeVerifier: string;
28
35
  scopes?: string[] | undefined;
@@ -32,7 +39,10 @@ declare const linear: (options: LinearOptions) => {
32
39
  idTokenNonce?: string | undefined;
33
40
  additionalParams?: Record<string, string> | undefined;
34
41
  }): Promise<URL>;
35
- validateAuthorizationCode: ({ code, redirectURI }: {
42
+ validateAuthorizationCode: ({
43
+ code,
44
+ redirectURI
45
+ }: {
36
46
  code: string;
37
47
  redirectURI: string;
38
48
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/linkedin.d.ts
4
3
  interface LinkedInProfile {
5
4
  sub: string;
@@ -20,8 +19,16 @@ interface LinkedInOptions extends ProviderOptions<LinkedInProfile> {
20
19
  declare const linkedin: (options: LinkedInOptions) => {
21
20
  id: "linkedin";
22
21
  name: string;
23
- accountSubject: ({ profile }: OAuthAccountKeyContext<LinkedInProfile>) => string;
24
- createAuthorizationURL: ({ state, scopes, redirectURI, loginHint, additionalParams }: {
22
+ accountSubject: ({
23
+ profile
24
+ }: OAuthAccountKeyContext<LinkedInProfile>) => string;
25
+ createAuthorizationURL: ({
26
+ state,
27
+ scopes,
28
+ redirectURI,
29
+ loginHint,
30
+ additionalParams
31
+ }: {
25
32
  state: string;
26
33
  codeVerifier: string;
27
34
  scopes?: string[] | undefined;
@@ -31,7 +38,10 @@ declare const linkedin: (options: LinkedInOptions) => {
31
38
  idTokenNonce?: string | undefined;
32
39
  additionalParams?: Record<string, string> | undefined;
33
40
  }) => Promise<URL>;
34
- validateAuthorizationCode: ({ code, redirectURI }: {
41
+ validateAuthorizationCode: ({
42
+ code,
43
+ redirectURI
44
+ }: {
35
45
  code: string;
36
46
  redirectURI: string;
37
47
  codeVerifier?: string | undefined;
@@ -1,6 +1,7 @@
1
1
  import { ClientAssertionGetter } from "../oauth2/client-assertion.mjs";
2
2
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
3
- import "../oauth2/index.mjs";
3
+ import * as _$jose from "jose";
4
+
4
5
  //#region src/social-providers/microsoft-entra-id.d.ts
5
6
  /**
6
7
  * @see [Microsoft Identity Platform - Optional claims reference](https://learn.microsoft.com/en-us/entra/identity-platform/optional-claims-reference)
@@ -138,8 +139,12 @@ interface MicrosoftOptions extends ProviderOptions<MicrosoftEntraIDProfile> {
138
139
  declare const microsoft: (options: MicrosoftOptions) => {
139
140
  id: "microsoft";
140
141
  name: string;
141
- accountSubject: ({ profile }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
142
- accountIssuer: ({ profile }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
142
+ accountSubject: ({
143
+ profile
144
+ }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
145
+ accountIssuer: ({
146
+ profile
147
+ }: OAuthAccountKeyContext<MicrosoftEntraIDProfile>) => string;
143
148
  createAuthorizationURL(data: {
144
149
  state: string;
145
150
  codeVerifier: string;
@@ -150,14 +155,18 @@ declare const microsoft: (options: MicrosoftOptions) => {
150
155
  idTokenNonce?: string | undefined;
151
156
  additionalParams?: Record<string, string> | undefined;
152
157
  }): Promise<URL>;
153
- validateAuthorizationCode({ code, codeVerifier, redirectURI }: {
158
+ validateAuthorizationCode({
159
+ code,
160
+ codeVerifier,
161
+ redirectURI
162
+ }: {
154
163
  code: string;
155
164
  redirectURI: string;
156
165
  codeVerifier?: string | undefined;
157
166
  deviceId?: string | undefined;
158
167
  }): Promise<OAuth2Tokens>;
159
168
  idToken: {
160
- jwks: (header: import("jose").JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
169
+ jwks: (header: _$jose.JWTHeaderParameters) => Promise<Uint8Array<ArrayBufferLike> | CryptoKey>;
161
170
  audience: string | string[];
162
171
  maxTokenAge: string;
163
172
  /**
@@ -110,8 +110,7 @@ const microsoft = (options) => {
110
110
  if (!context.response.ok) return;
111
111
  try {
112
112
  const pictureBuffer = await context.response.clone().arrayBuffer();
113
- const pictureBase64 = base64.encode(pictureBuffer);
114
- user.picture = `data:image/jpeg;base64, ${pictureBase64}`;
113
+ user.picture = `data:image/jpeg;base64, ${base64.encode(pictureBuffer)}`;
115
114
  } catch (e) {
116
115
  logger.error(e && typeof e === "object" && "name" in e ? e.name : "", e);
117
116
  }
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/naver.d.ts
4
3
  interface NaverProfile {
5
4
  /** API response result code */
@@ -7,25 +6,15 @@ interface NaverProfile {
7
6
  /** API response message */
8
7
  message: string;
9
8
  response: {
10
- /** Unique Naver user identifier */
11
- id: string;
12
- /** User nickname */
13
- nickname: string;
14
- /** User real name */
15
- name: string;
16
- /** User email address */
17
- email: string;
18
- /** Gender (F: female, M: male, U: unknown) */
19
- gender: string;
20
- /** Age range */
21
- age: string;
22
- /** Birthday (MM-DD format) */
23
- birthday: string;
24
- /** Birth year */
25
- birthyear: string;
26
- /** Profile image URL */
27
- profile_image: string;
28
- /** Mobile phone number */
9
+ /** Unique Naver user identifier */id: string; /** User nickname */
10
+ nickname: string; /** User real name */
11
+ name: string; /** User email address */
12
+ email: string; /** Gender (F: female, M: male, U: unknown) */
13
+ gender: string; /** Age range */
14
+ age: string; /** Birthday (MM-DD format) */
15
+ birthday: string; /** Birth year */
16
+ birthyear: string; /** Profile image URL */
17
+ profile_image: string; /** Mobile phone number */
29
18
  mobile: string;
30
19
  };
31
20
  }
@@ -35,8 +24,15 @@ interface NaverOptions extends ProviderOptions<NaverProfile> {
35
24
  declare const naver: (options: NaverOptions) => {
36
25
  id: "naver";
37
26
  name: string;
38
- accountSubject: ({ profile }: OAuthAccountKeyContext<NaverProfile>) => string;
39
- createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
27
+ accountSubject: ({
28
+ profile
29
+ }: OAuthAccountKeyContext<NaverProfile>) => string;
30
+ createAuthorizationURL({
31
+ state,
32
+ scopes,
33
+ redirectURI,
34
+ additionalParams
35
+ }: {
40
36
  state: string;
41
37
  codeVerifier: string;
42
38
  scopes?: string[] | undefined;
@@ -46,7 +42,10 @@ declare const naver: (options: NaverOptions) => {
46
42
  idTokenNonce?: string | undefined;
47
43
  additionalParams?: Record<string, string> | undefined;
48
44
  }): Promise<URL>;
49
- validateAuthorizationCode: ({ code, redirectURI }: {
45
+ validateAuthorizationCode: ({
46
+ code,
47
+ redirectURI
48
+ }: {
50
49
  code: string;
51
50
  redirectURI: string;
52
51
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/notion.d.ts
4
3
  interface NotionProfile {
5
4
  object: "user";
@@ -17,8 +16,16 @@ interface NotionOptions extends ProviderOptions<NotionProfile> {
17
16
  declare const notion: (options: NotionOptions) => {
18
17
  id: "notion";
19
18
  name: string;
20
- accountSubject: ({ profile }: OAuthAccountKeyContext<NotionProfile>) => string;
21
- createAuthorizationURL({ state, scopes, loginHint, redirectURI, additionalParams }: {
19
+ accountSubject: ({
20
+ profile
21
+ }: OAuthAccountKeyContext<NotionProfile>) => string;
22
+ createAuthorizationURL({
23
+ state,
24
+ scopes,
25
+ loginHint,
26
+ redirectURI,
27
+ additionalParams
28
+ }: {
22
29
  state: string;
23
30
  codeVerifier: string;
24
31
  scopes?: string[] | undefined;
@@ -28,7 +35,10 @@ declare const notion: (options: NotionOptions) => {
28
35
  idTokenNonce?: string | undefined;
29
36
  additionalParams?: Record<string, string> | undefined;
30
37
  }): Promise<URL>;
31
- validateAuthorizationCode: ({ code, redirectURI }: {
38
+ validateAuthorizationCode: ({
39
+ code,
40
+ redirectURI
41
+ }: {
32
42
  code: string;
33
43
  redirectURI: string;
34
44
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/paybin.d.ts
4
3
  interface PaybinProfile {
5
4
  sub: string;
@@ -22,9 +21,18 @@ interface PaybinOptions extends ProviderOptions<PaybinProfile> {
22
21
  declare const paybin: (options: PaybinOptions) => {
23
22
  id: "paybin";
24
23
  name: string;
25
- accountSubject: ({ profile }: OAuthAccountKeyContext<PaybinProfile>) => string;
24
+ accountSubject: ({
25
+ profile
26
+ }: OAuthAccountKeyContext<PaybinProfile>) => string;
26
27
  accountIssuer: string;
27
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint, additionalParams }: {
28
+ createAuthorizationURL({
29
+ state,
30
+ scopes,
31
+ codeVerifier,
32
+ redirectURI,
33
+ loginHint,
34
+ additionalParams
35
+ }: {
28
36
  state: string;
29
37
  codeVerifier: string;
30
38
  scopes?: string[] | undefined;
@@ -34,7 +42,11 @@ declare const paybin: (options: PaybinOptions) => {
34
42
  idTokenNonce?: string | undefined;
35
43
  additionalParams?: Record<string, string> | undefined;
36
44
  }): Promise<URL>;
37
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
45
+ validateAuthorizationCode: ({
46
+ code,
47
+ codeVerifier,
48
+ redirectURI
49
+ }: {
38
50
  code: string;
39
51
  redirectURI: string;
40
52
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/paypal.d.ts
4
3
  interface PayPalProfile {
5
4
  sub?: string | undefined;
@@ -53,8 +52,15 @@ interface PayPalOptions extends ProviderOptions<PayPalProfile> {
53
52
  declare const paypal: (options: PayPalOptions) => {
54
53
  id: "paypal";
55
54
  name: string;
56
- accountSubject: ({ profile }: OAuthAccountKeyContext<PayPalProfile>) => string;
57
- createAuthorizationURL({ state, codeVerifier, redirectURI, additionalParams }: {
55
+ accountSubject: ({
56
+ profile
57
+ }: OAuthAccountKeyContext<PayPalProfile>) => string;
58
+ createAuthorizationURL({
59
+ state,
60
+ codeVerifier,
61
+ redirectURI,
62
+ additionalParams
63
+ }: {
58
64
  state: string;
59
65
  codeVerifier: string;
60
66
  scopes?: string[] | undefined;
@@ -64,7 +70,10 @@ declare const paypal: (options: PayPalOptions) => {
64
70
  idTokenNonce?: string | undefined;
65
71
  additionalParams?: Record<string, string> | undefined;
66
72
  }): Promise<URL>;
67
- validateAuthorizationCode: ({ code, redirectURI }: {
73
+ validateAuthorizationCode: ({
74
+ code,
75
+ redirectURI
76
+ }: {
68
77
  code: string;
69
78
  redirectURI: string;
70
79
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/polar.d.ts
4
3
  interface PolarProfile {
5
4
  id: string;
@@ -26,8 +25,16 @@ interface PolarOptions extends ProviderOptions<PolarProfile> {}
26
25
  declare const polar: (options: PolarOptions) => {
27
26
  id: "polar";
28
27
  name: string;
29
- accountSubject: ({ profile }: OAuthAccountKeyContext<PolarProfile>) => string;
30
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
28
+ accountSubject: ({
29
+ profile
30
+ }: OAuthAccountKeyContext<PolarProfile>) => string;
31
+ createAuthorizationURL({
32
+ state,
33
+ scopes,
34
+ codeVerifier,
35
+ redirectURI,
36
+ additionalParams
37
+ }: {
31
38
  state: string;
32
39
  codeVerifier: string;
33
40
  scopes?: string[] | undefined;
@@ -37,7 +44,11 @@ declare const polar: (options: PolarOptions) => {
37
44
  idTokenNonce?: string | undefined;
38
45
  additionalParams?: Record<string, string> | undefined;
39
46
  }): Promise<URL>;
40
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
47
+ validateAuthorizationCode: ({
48
+ code,
49
+ codeVerifier,
50
+ redirectURI
51
+ }: {
41
52
  code: string;
42
53
  redirectURI: string;
43
54
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/railway.d.ts
4
3
  interface RailwayProfile {
5
4
  /** The user's unique ID (OAuth `sub` claim). */
@@ -17,8 +16,16 @@ interface RailwayOptions extends ProviderOptions<RailwayProfile> {
17
16
  declare const railway: (options: RailwayOptions) => {
18
17
  id: "railway";
19
18
  name: string;
20
- accountSubject: ({ profile }: OAuthAccountKeyContext<RailwayProfile>) => string;
21
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
19
+ accountSubject: ({
20
+ profile
21
+ }: OAuthAccountKeyContext<RailwayProfile>) => string;
22
+ createAuthorizationURL({
23
+ state,
24
+ scopes,
25
+ codeVerifier,
26
+ redirectURI,
27
+ additionalParams
28
+ }: {
22
29
  state: string;
23
30
  codeVerifier: string;
24
31
  scopes?: string[] | undefined;
@@ -28,7 +35,11 @@ declare const railway: (options: RailwayOptions) => {
28
35
  idTokenNonce?: string | undefined;
29
36
  additionalParams?: Record<string, string> | undefined;
30
37
  }): Promise<URL>;
31
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
38
+ validateAuthorizationCode: ({
39
+ code,
40
+ codeVerifier,
41
+ redirectURI
42
+ }: {
32
43
  code: string;
33
44
  redirectURI: string;
34
45
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/reddit.d.ts
4
3
  interface RedditProfile {
5
4
  id: string;
@@ -16,8 +15,15 @@ interface RedditOptions extends ProviderOptions<RedditProfile> {
16
15
  declare const reddit: (options: RedditOptions) => {
17
16
  id: "reddit";
18
17
  name: string;
19
- accountSubject: ({ profile }: OAuthAccountKeyContext<RedditProfile>) => string;
20
- createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
18
+ accountSubject: ({
19
+ profile
20
+ }: OAuthAccountKeyContext<RedditProfile>) => string;
21
+ createAuthorizationURL({
22
+ state,
23
+ scopes,
24
+ redirectURI,
25
+ additionalParams
26
+ }: {
21
27
  state: string;
22
28
  codeVerifier: string;
23
29
  scopes?: string[] | undefined;
@@ -27,7 +33,10 @@ declare const reddit: (options: RedditOptions) => {
27
33
  idTokenNonce?: string | undefined;
28
34
  additionalParams?: Record<string, string> | undefined;
29
35
  }): Promise<URL>;
30
- validateAuthorizationCode: ({ code, redirectURI }: {
36
+ validateAuthorizationCode: ({
37
+ code,
38
+ redirectURI
39
+ }: {
31
40
  code: string;
32
41
  redirectURI: string;
33
42
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/roblox.d.ts
4
3
  interface RobloxProfile extends Record<string, any> {
5
4
  /** the user's id */
@@ -24,8 +23,15 @@ interface RobloxOptions extends ProviderOptions<RobloxProfile> {
24
23
  declare const roblox: (options: RobloxOptions) => {
25
24
  id: "roblox";
26
25
  name: string;
27
- accountSubject: ({ profile }: OAuthAccountKeyContext<RobloxProfile>) => string;
28
- createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
26
+ accountSubject: ({
27
+ profile
28
+ }: OAuthAccountKeyContext<RobloxProfile>) => string;
29
+ createAuthorizationURL({
30
+ state,
31
+ scopes,
32
+ redirectURI,
33
+ additionalParams
34
+ }: {
29
35
  state: string;
30
36
  codeVerifier: string;
31
37
  scopes?: string[] | undefined;
@@ -35,7 +41,10 @@ declare const roblox: (options: RobloxOptions) => {
35
41
  idTokenNonce?: string | undefined;
36
42
  additionalParams?: Record<string, string> | undefined;
37
43
  }): Promise<URL>;
38
- validateAuthorizationCode: ({ code, redirectURI }: {
44
+ validateAuthorizationCode: ({
45
+ code,
46
+ redirectURI
47
+ }: {
39
48
  code: string;
40
49
  redirectURI: string;
41
50
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/salesforce.d.ts
4
3
  interface SalesforceProfile {
5
4
  sub: string;
@@ -31,8 +30,16 @@ interface SalesforceOptions extends ProviderOptions<SalesforceProfile> {
31
30
  declare const salesforce: (options: SalesforceOptions) => {
32
31
  id: "salesforce";
33
32
  name: string;
34
- accountSubject: ({ profile }: OAuthAccountKeyContext<SalesforceProfile>) => string;
35
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, additionalParams }: {
33
+ accountSubject: ({
34
+ profile
35
+ }: OAuthAccountKeyContext<SalesforceProfile>) => string;
36
+ createAuthorizationURL({
37
+ state,
38
+ scopes,
39
+ codeVerifier,
40
+ redirectURI,
41
+ additionalParams
42
+ }: {
36
43
  state: string;
37
44
  codeVerifier: string;
38
45
  scopes?: string[] | undefined;
@@ -42,7 +49,11 @@ declare const salesforce: (options: SalesforceOptions) => {
42
49
  idTokenNonce?: string | undefined;
43
50
  additionalParams?: Record<string, string> | undefined;
44
51
  }): Promise<URL>;
45
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
52
+ validateAuthorizationCode: ({
53
+ code,
54
+ codeVerifier,
55
+ redirectURI
56
+ }: {
46
57
  code: string;
47
58
  redirectURI: string;
48
59
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, OAuth2UserInfo, OAuthAccountKeyContext, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/slack.d.ts
4
3
  interface SlackProfile extends Record<string, any> {
5
4
  ok: boolean;
@@ -37,8 +36,15 @@ interface SlackOptions extends ProviderOptions<SlackProfile> {
37
36
  declare const slack: (options: SlackOptions) => {
38
37
  id: "slack";
39
38
  name: string;
40
- accountSubject: ({ profile }: OAuthAccountKeyContext<SlackProfile>) => string;
41
- createAuthorizationURL({ state, scopes, redirectURI, additionalParams }: {
39
+ accountSubject: ({
40
+ profile
41
+ }: OAuthAccountKeyContext<SlackProfile>) => string;
42
+ createAuthorizationURL({
43
+ state,
44
+ scopes,
45
+ redirectURI,
46
+ additionalParams
47
+ }: {
42
48
  state: string;
43
49
  codeVerifier: string;
44
50
  scopes?: string[] | undefined;
@@ -48,7 +54,10 @@ declare const slack: (options: SlackOptions) => {
48
54
  idTokenNonce?: string | undefined;
49
55
  additionalParams?: Record<string, string> | undefined;
50
56
  }): Promise<URL>;
51
- validateAuthorizationCode: ({ code, redirectURI }: {
57
+ validateAuthorizationCode: ({
58
+ code,
59
+ redirectURI
60
+ }: {
52
61
  code: string;
53
62
  redirectURI: string;
54
63
  codeVerifier?: string | undefined;