@better-auth/core 1.6.27 → 1.6.28

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 (101) hide show
  1. package/dist/api/index.d.mts +26 -26
  2. package/dist/async_hooks/index.d.mts +1 -0
  3. package/dist/async_hooks/pure.index.d.mts +1 -0
  4. package/dist/context/endpoint-context.d.mts +1 -1
  5. package/dist/context/global.d.mts +1 -0
  6. package/dist/context/global.mjs +1 -1
  7. package/dist/context/request-state.d.mts +1 -0
  8. package/dist/context/transaction.d.mts +1 -1
  9. package/dist/db/adapter/factory.d.mts +5 -3
  10. package/dist/db/adapter/factory.mjs +2 -2
  11. package/dist/db/adapter/get-default-field-name.d.mts +9 -2
  12. package/dist/db/adapter/get-default-model-name.d.mts +5 -1
  13. package/dist/db/adapter/get-field-attributes.d.mts +11 -4
  14. package/dist/db/adapter/get-field-name.d.mts +9 -2
  15. package/dist/db/adapter/get-id-field.d.mts +12 -4
  16. package/dist/db/adapter/get-model-name.d.mts +5 -1
  17. package/dist/db/adapter/index.d.mts +32 -7
  18. package/dist/db/adapter/types.d.mts +17 -5
  19. package/dist/db/adapter/utils.d.mts +1 -0
  20. package/dist/db/get-tables.d.mts +0 -1
  21. package/dist/db/plugin.d.mts +2 -1
  22. package/dist/db/schema/account.d.mts +1 -1
  23. package/dist/db/schema/rate-limit.d.mts +1 -1
  24. package/dist/db/schema/session.d.mts +1 -1
  25. package/dist/db/schema/shared.d.mts +1 -0
  26. package/dist/db/schema/user.d.mts +1 -1
  27. package/dist/db/schema/verification.d.mts +1 -1
  28. package/dist/db/type.d.mts +10 -6
  29. package/dist/env/logger.d.mts +25 -25
  30. package/dist/error/codes.d.mts +1 -0
  31. package/dist/error/index.d.mts +1 -0
  32. package/dist/index.d.mts +1 -1
  33. package/dist/instrumentation/attributes.d.mts +1 -0
  34. package/dist/instrumentation/pure.index.d.mts +1 -0
  35. package/dist/instrumentation/tracer.mjs +1 -1
  36. package/dist/oauth2/client-credentials-token.d.mts +20 -4
  37. package/dist/oauth2/create-authorization-url.d.mts +20 -3
  38. package/dist/oauth2/oauth-provider.d.mts +0 -1
  39. package/dist/oauth2/refresh-access-token.d.mts +22 -4
  40. package/dist/oauth2/reject-redirects.mjs +1 -1
  41. package/dist/oauth2/utils.d.mts +1 -0
  42. package/dist/oauth2/validate-authorization-code.d.mts +37 -6
  43. package/dist/oauth2/verify.d.mts +10 -12
  44. package/dist/oauth2/verify.mjs +2 -2
  45. package/dist/social-providers/apple.d.mts +11 -4
  46. package/dist/social-providers/atlassian.d.mts +11 -3
  47. package/dist/social-providers/cognito.d.mts +11 -4
  48. package/dist/social-providers/discord.d.mts +9 -3
  49. package/dist/social-providers/dropbox.d.mts +11 -3
  50. package/dist/social-providers/facebook.d.mts +10 -4
  51. package/dist/social-providers/figma.d.mts +11 -3
  52. package/dist/social-providers/github.d.mts +12 -3
  53. package/dist/social-providers/gitlab.d.mts +12 -3
  54. package/dist/social-providers/google.d.mts +19 -5
  55. package/dist/social-providers/huggingface.d.mts +11 -3
  56. package/dist/social-providers/index.d.mts +364 -78
  57. package/dist/social-providers/kakao.d.mts +9 -3
  58. package/dist/social-providers/kick.d.mts +11 -3
  59. package/dist/social-providers/line.d.mts +12 -4
  60. package/dist/social-providers/linear.d.mts +10 -3
  61. package/dist/social-providers/linkedin.d.mts +10 -3
  62. package/dist/social-providers/microsoft-entra-id.d.mts +5 -3
  63. package/dist/social-providers/microsoft-entra-id.mjs +1 -2
  64. package/dist/social-providers/naver.d.mts +18 -22
  65. package/dist/social-providers/notion.d.mts +10 -3
  66. package/dist/social-providers/paybin.d.mts +12 -3
  67. package/dist/social-providers/paypal.d.mts +9 -4
  68. package/dist/social-providers/polar.d.mts +11 -3
  69. package/dist/social-providers/railway.d.mts +11 -3
  70. package/dist/social-providers/reddit.d.mts +9 -3
  71. package/dist/social-providers/roblox.d.mts +9 -3
  72. package/dist/social-providers/salesforce.d.mts +11 -3
  73. package/dist/social-providers/slack.d.mts +9 -3
  74. package/dist/social-providers/spotify.d.mts +11 -3
  75. package/dist/social-providers/tiktok.d.mts +10 -5
  76. package/dist/social-providers/twitch.d.mts +9 -3
  77. package/dist/social-providers/twitter.d.mts +16 -25
  78. package/dist/social-providers/vercel.d.mts +11 -3
  79. package/dist/social-providers/vk.d.mts +12 -3
  80. package/dist/social-providers/wechat.d.mts +8 -3
  81. package/dist/social-providers/zoom.d.mts +14 -5
  82. package/dist/types/context.d.mts +1 -2
  83. package/dist/types/cookie.d.mts +1 -0
  84. package/dist/types/helper.d.mts +1 -1
  85. package/dist/types/index.d.mts +1 -1
  86. package/dist/types/init-options.d.mts +7 -10
  87. package/dist/types/plugin-client.d.mts +3 -1
  88. package/dist/types/plugin.d.mts +2 -2
  89. package/dist/utils/async.d.mts +1 -0
  90. package/dist/utils/db.d.mts +0 -1
  91. package/dist/utils/deprecate.d.mts +1 -0
  92. package/dist/utils/email.d.mts +4 -1
  93. package/dist/utils/error-codes.d.mts +2 -2
  94. package/dist/utils/host.d.mts +1 -27
  95. package/dist/utils/host.mjs +1 -1
  96. package/dist/utils/ip.d.mts +0 -1
  97. package/dist/utils/ip.mjs +1 -1
  98. package/dist/utils/is-api-error.d.mts +1 -0
  99. package/dist/utils/redirect-uri.d.mts +1 -0
  100. package/package.json +2 -2
  101. package/src/db/type.ts +2 -1
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +93,11 @@ interface KakaoOptions extends ProviderOptions<KakaoProfile> {
94
93
  declare const kakao: (options: KakaoOptions) => {
95
94
  id: "kakao";
96
95
  name: string;
97
- createAuthorizationURL({ state, scopes, redirectURI }: {
96
+ createAuthorizationURL({
97
+ state,
98
+ scopes,
99
+ redirectURI
100
+ }: {
98
101
  state: string;
99
102
  codeVerifier: string;
100
103
  scopes?: string[] | undefined;
@@ -102,7 +105,10 @@ declare const kakao: (options: KakaoOptions) => {
102
105
  display?: string | undefined;
103
106
  loginHint?: string | undefined;
104
107
  }): Promise<URL>;
105
- validateAuthorizationCode: ({ code, redirectURI }: {
108
+ validateAuthorizationCode: ({
109
+ code,
110
+ redirectURI
111
+ }: {
106
112
  code: string;
107
113
  redirectURI: string;
108
114
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +24,12 @@ interface KickOptions extends ProviderOptions<KickProfile> {
25
24
  declare const kick: (options: KickOptions) => {
26
25
  id: "kick";
27
26
  name: string;
28
- createAuthorizationURL({ state, scopes, redirectURI, codeVerifier }: {
27
+ createAuthorizationURL({
28
+ state,
29
+ scopes,
30
+ redirectURI,
31
+ codeVerifier
32
+ }: {
29
33
  state: string;
30
34
  codeVerifier: string;
31
35
  scopes?: string[] | undefined;
@@ -33,7 +37,11 @@ declare const kick: (options: KickOptions) => {
33
37
  display?: string | undefined;
34
38
  loginHint?: string | undefined;
35
39
  }): Promise<URL>;
36
- validateAuthorizationCode({ code, redirectURI, codeVerifier }: {
40
+ validateAuthorizationCode({
41
+ code,
42
+ redirectURI,
43
+ codeVerifier
44
+ }: {
37
45
  code: string;
38
46
  redirectURI: string;
39
47
  codeVerifier?: string | undefined;
@@ -1,7 +1,5 @@
1
1
  import { GenericEndpointContext } from "../types/context.mjs";
2
- import "../types/index.mjs";
3
2
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
4
- import "../oauth2/index.mjs";
5
3
  //#region src/social-providers/line.d.ts
6
4
  interface LineIdTokenPayload {
7
5
  iss: string;
@@ -36,7 +34,13 @@ interface LineOptions extends ProviderOptions<LineUserInfo | LineIdTokenPayload>
36
34
  declare const line: (options: LineOptions) => {
37
35
  id: "line";
38
36
  name: string;
39
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint }: {
37
+ createAuthorizationURL({
38
+ state,
39
+ scopes,
40
+ codeVerifier,
41
+ redirectURI,
42
+ loginHint
43
+ }: {
40
44
  state: string;
41
45
  codeVerifier: string;
42
46
  scopes?: string[] | undefined;
@@ -44,7 +48,11 @@ declare const line: (options: LineOptions) => {
44
48
  display?: string | undefined;
45
49
  loginHint?: string | undefined;
46
50
  }): Promise<URL>;
47
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
51
+ validateAuthorizationCode: ({
52
+ code,
53
+ codeVerifier,
54
+ redirectURI
55
+ }: {
48
56
  code: string;
49
57
  redirectURI: string;
50
58
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +20,12 @@ interface LinearOptions extends ProviderOptions<LinearUser> {
21
20
  declare const linear: (options: LinearOptions) => {
22
21
  id: "linear";
23
22
  name: string;
24
- createAuthorizationURL({ state, scopes, loginHint, redirectURI }: {
23
+ createAuthorizationURL({
24
+ state,
25
+ scopes,
26
+ loginHint,
27
+ redirectURI
28
+ }: {
25
29
  state: string;
26
30
  codeVerifier: string;
27
31
  scopes?: string[] | undefined;
@@ -29,7 +33,10 @@ declare const linear: (options: LinearOptions) => {
29
33
  display?: string | undefined;
30
34
  loginHint?: string | undefined;
31
35
  }): Promise<URL>;
32
- validateAuthorizationCode: ({ code, redirectURI }: {
36
+ validateAuthorizationCode: ({
37
+ code,
38
+ redirectURI
39
+ }: {
33
40
  code: string;
34
41
  redirectURI: string;
35
42
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +19,12 @@ interface LinkedInOptions extends ProviderOptions<LinkedInProfile> {
20
19
  declare const linkedin: (options: LinkedInOptions) => {
21
20
  id: "linkedin";
22
21
  name: string;
23
- createAuthorizationURL: ({ state, scopes, redirectURI, loginHint }: {
22
+ createAuthorizationURL: ({
23
+ state,
24
+ scopes,
25
+ redirectURI,
26
+ loginHint
27
+ }: {
24
28
  state: string;
25
29
  codeVerifier: string;
26
30
  scopes?: string[] | undefined;
@@ -28,7 +32,10 @@ declare const linkedin: (options: LinkedInOptions) => {
28
32
  display?: string | undefined;
29
33
  loginHint?: string | undefined;
30
34
  }) => Promise<URL>;
31
- validateAuthorizationCode: ({ code, redirectURI }: {
35
+ validateAuthorizationCode: ({
36
+ code,
37
+ redirectURI
38
+ }: {
32
39
  code: string;
33
40
  redirectURI: string;
34
41
  codeVerifier?: string | undefined;
@@ -1,7 +1,5 @@
1
1
  import { GenericEndpointContext } from "../types/context.mjs";
2
- import "../types/index.mjs";
3
2
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
4
- import "../oauth2/index.mjs";
5
3
  //#region src/social-providers/microsoft-entra-id.d.ts
6
4
  /**
7
5
  * @see [Microsoft Identity Platform - Optional claims reference](https://learn.microsoft.com/en-us/entra/identity-platform/optional-claims-reference)
@@ -139,7 +137,11 @@ declare const microsoft: (options: MicrosoftOptions) => {
139
137
  display?: string | undefined;
140
138
  loginHint?: string | undefined;
141
139
  }): Promise<URL>;
142
- validateAuthorizationCode({ code, codeVerifier, redirectURI }: {
140
+ validateAuthorizationCode({
141
+ code,
142
+ codeVerifier,
143
+ redirectURI
144
+ }: {
143
145
  code: string;
144
146
  redirectURI: string;
145
147
  codeVerifier?: string | undefined;
@@ -99,8 +99,7 @@ const microsoft = (options) => {
99
99
  if (options.disableProfilePhoto || !context.response.ok) return;
100
100
  try {
101
101
  const pictureBuffer = await context.response.clone().arrayBuffer();
102
- const pictureBase64 = base64.encode(pictureBuffer);
103
- user.picture = `data:image/jpeg;base64, ${pictureBase64}`;
102
+ user.picture = `data:image/jpeg;base64, ${base64.encode(pictureBuffer)}`;
104
103
  } catch (e) {
105
104
  logger.error(e && typeof e === "object" && "name" in e ? e.name : "", e);
106
105
  }
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +24,11 @@ interface NaverOptions extends ProviderOptions<NaverProfile> {
35
24
  declare const naver: (options: NaverOptions) => {
36
25
  id: "naver";
37
26
  name: string;
38
- createAuthorizationURL({ state, scopes, redirectURI }: {
27
+ createAuthorizationURL({
28
+ state,
29
+ scopes,
30
+ redirectURI
31
+ }: {
39
32
  state: string;
40
33
  codeVerifier: string;
41
34
  scopes?: string[] | undefined;
@@ -43,7 +36,10 @@ declare const naver: (options: NaverOptions) => {
43
36
  display?: string | undefined;
44
37
  loginHint?: string | undefined;
45
38
  }): Promise<URL>;
46
- validateAuthorizationCode: ({ code, redirectURI }: {
39
+ validateAuthorizationCode: ({
40
+ code,
41
+ redirectURI
42
+ }: {
47
43
  code: string;
48
44
  redirectURI: string;
49
45
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +16,12 @@ interface NotionOptions extends ProviderOptions<NotionProfile> {
17
16
  declare const notion: (options: NotionOptions) => {
18
17
  id: "notion";
19
18
  name: string;
20
- createAuthorizationURL({ state, scopes, loginHint, redirectURI }: {
19
+ createAuthorizationURL({
20
+ state,
21
+ scopes,
22
+ loginHint,
23
+ redirectURI
24
+ }: {
21
25
  state: string;
22
26
  codeVerifier: string;
23
27
  scopes?: string[] | undefined;
@@ -25,7 +29,10 @@ declare const notion: (options: NotionOptions) => {
25
29
  display?: string | undefined;
26
30
  loginHint?: string | undefined;
27
31
  }): Promise<URL>;
28
- validateAuthorizationCode: ({ code, redirectURI }: {
32
+ validateAuthorizationCode: ({
33
+ code,
34
+ redirectURI
35
+ }: {
29
36
  code: string;
30
37
  redirectURI: string;
31
38
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +21,13 @@ interface PaybinOptions extends ProviderOptions<PaybinProfile> {
22
21
  declare const paybin: (options: PaybinOptions) => {
23
22
  id: "paybin";
24
23
  name: string;
25
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI, loginHint }: {
24
+ createAuthorizationURL({
25
+ state,
26
+ scopes,
27
+ codeVerifier,
28
+ redirectURI,
29
+ loginHint
30
+ }: {
26
31
  state: string;
27
32
  codeVerifier: string;
28
33
  scopes?: string[] | undefined;
@@ -30,7 +35,11 @@ declare const paybin: (options: PaybinOptions) => {
30
35
  display?: string | undefined;
31
36
  loginHint?: string | undefined;
32
37
  }): Promise<URL>;
33
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
38
+ validateAuthorizationCode: ({
39
+ code,
40
+ codeVerifier,
41
+ redirectURI
42
+ }: {
34
43
  code: string;
35
44
  redirectURI: string;
36
45
  codeVerifier?: string | undefined;
@@ -1,7 +1,5 @@
1
1
  import { GenericEndpointContext } from "../types/context.mjs";
2
- import "../types/index.mjs";
3
2
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
4
- import "../oauth2/index.mjs";
5
3
  //#region src/social-providers/paypal.d.ts
6
4
  interface PayPalProfile {
7
5
  sub?: string | undefined;
@@ -55,7 +53,11 @@ interface PayPalOptions extends ProviderOptions<PayPalProfile> {
55
53
  declare const paypal: (options: PayPalOptions) => {
56
54
  id: "paypal";
57
55
  name: string;
58
- createAuthorizationURL({ state, codeVerifier, redirectURI }: {
56
+ createAuthorizationURL({
57
+ state,
58
+ codeVerifier,
59
+ redirectURI
60
+ }: {
59
61
  state: string;
60
62
  codeVerifier: string;
61
63
  scopes?: string[] | undefined;
@@ -63,7 +65,10 @@ declare const paypal: (options: PayPalOptions) => {
63
65
  display?: string | undefined;
64
66
  loginHint?: string | undefined;
65
67
  }): Promise<URL>;
66
- validateAuthorizationCode: ({ code, redirectURI }: {
68
+ validateAuthorizationCode: ({
69
+ code,
70
+ redirectURI
71
+ }: {
67
72
  code: string;
68
73
  redirectURI: string;
69
74
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +25,12 @@ interface PolarOptions extends ProviderOptions<PolarProfile> {}
26
25
  declare const polar: (options: PolarOptions) => {
27
26
  id: "polar";
28
27
  name: string;
29
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }: {
28
+ createAuthorizationURL({
29
+ state,
30
+ scopes,
31
+ codeVerifier,
32
+ redirectURI
33
+ }: {
30
34
  state: string;
31
35
  codeVerifier: string;
32
36
  scopes?: string[] | undefined;
@@ -34,7 +38,11 @@ declare const polar: (options: PolarOptions) => {
34
38
  display?: string | undefined;
35
39
  loginHint?: string | undefined;
36
40
  }): Promise<URL>;
37
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
41
+ validateAuthorizationCode: ({
42
+ code,
43
+ codeVerifier,
44
+ redirectURI
45
+ }: {
38
46
  code: string;
39
47
  redirectURI: string;
40
48
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +16,12 @@ interface RailwayOptions extends ProviderOptions<RailwayProfile> {
17
16
  declare const railway: (options: RailwayOptions) => {
18
17
  id: "railway";
19
18
  name: string;
20
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }: {
19
+ createAuthorizationURL({
20
+ state,
21
+ scopes,
22
+ codeVerifier,
23
+ redirectURI
24
+ }: {
21
25
  state: string;
22
26
  codeVerifier: string;
23
27
  scopes?: string[] | undefined;
@@ -25,7 +29,11 @@ declare const railway: (options: RailwayOptions) => {
25
29
  display?: string | undefined;
26
30
  loginHint?: string | undefined;
27
31
  }): Promise<URL>;
28
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
32
+ validateAuthorizationCode: ({
33
+ code,
34
+ codeVerifier,
35
+ redirectURI
36
+ }: {
29
37
  code: string;
30
38
  redirectURI: string;
31
39
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +15,11 @@ interface RedditOptions extends ProviderOptions<RedditProfile> {
16
15
  declare const reddit: (options: RedditOptions) => {
17
16
  id: "reddit";
18
17
  name: string;
19
- createAuthorizationURL({ state, scopes, redirectURI }: {
18
+ createAuthorizationURL({
19
+ state,
20
+ scopes,
21
+ redirectURI
22
+ }: {
20
23
  state: string;
21
24
  codeVerifier: string;
22
25
  scopes?: string[] | undefined;
@@ -24,7 +27,10 @@ declare const reddit: (options: RedditOptions) => {
24
27
  display?: string | undefined;
25
28
  loginHint?: string | undefined;
26
29
  }): Promise<URL>;
27
- validateAuthorizationCode: ({ code, redirectURI }: {
30
+ validateAuthorizationCode: ({
31
+ code,
32
+ redirectURI
33
+ }: {
28
34
  code: string;
29
35
  redirectURI: string;
30
36
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +23,11 @@ interface RobloxOptions extends ProviderOptions<RobloxProfile> {
24
23
  declare const roblox: (options: RobloxOptions) => {
25
24
  id: "roblox";
26
25
  name: string;
27
- createAuthorizationURL({ state, scopes, redirectURI }: {
26
+ createAuthorizationURL({
27
+ state,
28
+ scopes,
29
+ redirectURI
30
+ }: {
28
31
  state: string;
29
32
  codeVerifier: string;
30
33
  scopes?: string[] | undefined;
@@ -32,7 +35,10 @@ declare const roblox: (options: RobloxOptions) => {
32
35
  display?: string | undefined;
33
36
  loginHint?: string | undefined;
34
37
  }): URL;
35
- validateAuthorizationCode: ({ code, redirectURI }: {
38
+ validateAuthorizationCode: ({
39
+ code,
40
+ redirectURI
41
+ }: {
36
42
  code: string;
37
43
  redirectURI: string;
38
44
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +30,12 @@ interface SalesforceOptions extends ProviderOptions<SalesforceProfile> {
31
30
  declare const salesforce: (options: SalesforceOptions) => {
32
31
  id: "salesforce";
33
32
  name: string;
34
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }: {
33
+ createAuthorizationURL({
34
+ state,
35
+ scopes,
36
+ codeVerifier,
37
+ redirectURI
38
+ }: {
35
39
  state: string;
36
40
  codeVerifier: string;
37
41
  scopes?: string[] | undefined;
@@ -39,7 +43,11 @@ declare const salesforce: (options: SalesforceOptions) => {
39
43
  display?: string | undefined;
40
44
  loginHint?: string | undefined;
41
45
  }): Promise<URL>;
42
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
46
+ validateAuthorizationCode: ({
47
+ code,
48
+ codeVerifier,
49
+ redirectURI
50
+ }: {
43
51
  code: string;
44
52
  redirectURI: string;
45
53
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, 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,7 +36,11 @@ interface SlackOptions extends ProviderOptions<SlackProfile> {
37
36
  declare const slack: (options: SlackOptions) => {
38
37
  id: "slack";
39
38
  name: string;
40
- createAuthorizationURL({ state, scopes, redirectURI }: {
39
+ createAuthorizationURL({
40
+ state,
41
+ scopes,
42
+ redirectURI
43
+ }: {
41
44
  state: string;
42
45
  codeVerifier: string;
43
46
  scopes?: string[] | undefined;
@@ -45,7 +48,10 @@ declare const slack: (options: SlackOptions) => {
45
48
  display?: string | undefined;
46
49
  loginHint?: string | undefined;
47
50
  }): URL;
48
- validateAuthorizationCode: ({ code, redirectURI }: {
51
+ validateAuthorizationCode: ({
52
+ code,
53
+ redirectURI
54
+ }: {
49
55
  code: string;
50
56
  redirectURI: string;
51
57
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/spotify.d.ts
4
3
  interface SpotifyProfile {
5
4
  id: string;
@@ -15,7 +14,12 @@ interface SpotifyOptions extends ProviderOptions<SpotifyProfile> {
15
14
  declare const spotify: (options: SpotifyOptions) => {
16
15
  id: "spotify";
17
16
  name: string;
18
- createAuthorizationURL({ state, scopes, codeVerifier, redirectURI }: {
17
+ createAuthorizationURL({
18
+ state,
19
+ scopes,
20
+ codeVerifier,
21
+ redirectURI
22
+ }: {
19
23
  state: string;
20
24
  codeVerifier: string;
21
25
  scopes?: string[] | undefined;
@@ -23,7 +27,11 @@ declare const spotify: (options: SpotifyOptions) => {
23
27
  display?: string | undefined;
24
28
  loginHint?: string | undefined;
25
29
  }): Promise<URL>;
26
- validateAuthorizationCode: ({ code, codeVerifier, redirectURI }: {
30
+ validateAuthorizationCode: ({
31
+ code,
32
+ codeVerifier,
33
+ redirectURI
34
+ }: {
27
35
  code: string;
28
36
  redirectURI: string;
29
37
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/tiktok.d.ts
4
3
  /**
5
4
  * [More info](https://developers.tiktok.com/doc/tiktok-api-v2-get-user-info/)
@@ -52,8 +51,7 @@ interface TiktokProfile extends Record<string, any> {
52
51
  *
53
52
  * To return this field, add `fields=username` in the user profile request's query parameter.
54
53
  */
55
- username: string;
56
- /** @note Email is currently unsupported by TikTok */
54
+ username: string; /** @note Email is currently unsupported by TikTok */
57
55
  email?: string | undefined;
58
56
  /**
59
57
  * User's bio description if there is a valid one.
@@ -123,7 +121,11 @@ interface TiktokOptions extends ProviderOptions {
123
121
  declare const tiktok: (options: TiktokOptions) => {
124
122
  id: "tiktok";
125
123
  name: string;
126
- createAuthorizationURL({ state, scopes, redirectURI }: {
124
+ createAuthorizationURL({
125
+ state,
126
+ scopes,
127
+ redirectURI
128
+ }: {
127
129
  state: string;
128
130
  codeVerifier: string;
129
131
  scopes?: string[] | undefined;
@@ -131,7 +133,10 @@ declare const tiktok: (options: TiktokOptions) => {
131
133
  display?: string | undefined;
132
134
  loginHint?: string | undefined;
133
135
  }): URL;
134
- validateAuthorizationCode: ({ code, redirectURI }: {
136
+ validateAuthorizationCode: ({
137
+ code,
138
+ redirectURI
139
+ }: {
135
140
  code: string;
136
141
  redirectURI: string;
137
142
  codeVerifier?: string | undefined;
@@ -1,5 +1,4 @@
1
1
  import { OAuth2Tokens, ProviderOptions } from "../oauth2/oauth-provider.mjs";
2
- import "../oauth2/index.mjs";
3
2
  //#region src/social-providers/twitch.d.ts
4
3
  /**
5
4
  * @see https://dev.twitch.tv/docs/authentication/getting-tokens-oidc/#requesting-claims
@@ -33,7 +32,11 @@ interface TwitchOptions extends ProviderOptions<TwitchProfile> {
33
32
  declare const twitch: (options: TwitchOptions) => {
34
33
  id: "twitch";
35
34
  name: string;
36
- createAuthorizationURL({ state, scopes, redirectURI }: {
35
+ createAuthorizationURL({
36
+ state,
37
+ scopes,
38
+ redirectURI
39
+ }: {
37
40
  state: string;
38
41
  codeVerifier: string;
39
42
  scopes?: string[] | undefined;
@@ -41,7 +44,10 @@ declare const twitch: (options: TwitchOptions) => {
41
44
  display?: string | undefined;
42
45
  loginHint?: string | undefined;
43
46
  }): Promise<URL>;
44
- validateAuthorizationCode: ({ code, redirectURI }: {
47
+ validateAuthorizationCode: ({
48
+ code,
49
+ redirectURI
50
+ }: {
45
51
  code: string;
46
52
  redirectURI: string;
47
53
  codeVerifier?: string | undefined;