@draftlab/auth 0.0.3 → 0.1.0

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 (78) hide show
  1. package/dist/allow.d.ts +58 -1
  2. package/dist/allow.js +61 -2
  3. package/dist/client.d.ts +2 -3
  4. package/dist/client.js +2 -2
  5. package/dist/core.d.ts +128 -8
  6. package/dist/core.js +496 -12
  7. package/dist/error.d.ts +242 -1
  8. package/dist/error.js +235 -1
  9. package/dist/index.d.ts +1 -8
  10. package/dist/index.js +1 -12
  11. package/dist/keys.d.ts +1 -1
  12. package/dist/keys.js +138 -3
  13. package/dist/pkce.js +160 -1
  14. package/dist/provider/code.d.ts +227 -3
  15. package/dist/provider/code.js +27 -14
  16. package/dist/provider/facebook.d.ts +2 -3
  17. package/dist/provider/facebook.js +1 -5
  18. package/dist/provider/github.d.ts +2 -3
  19. package/dist/provider/github.js +1 -5
  20. package/dist/provider/google.d.ts +2 -3
  21. package/dist/provider/google.js +1 -5
  22. package/dist/provider/oauth2.d.ts +175 -3
  23. package/dist/provider/oauth2.js +153 -5
  24. package/dist/provider/password.d.ts +384 -3
  25. package/dist/provider/password.js +4 -4
  26. package/dist/provider/provider.d.ts +226 -2
  27. package/dist/random.js +85 -1
  28. package/dist/storage/memory.d.ts +2 -2
  29. package/dist/storage/memory.js +1 -1
  30. package/dist/storage/storage.d.ts +161 -1
  31. package/dist/storage/storage.js +60 -1
  32. package/dist/storage/turso.d.ts +1 -1
  33. package/dist/storage/turso.js +1 -1
  34. package/dist/storage/unstorage.d.ts +2 -2
  35. package/dist/storage/unstorage.js +2 -2
  36. package/dist/subject.d.ts +61 -2
  37. package/dist/themes/theme.d.ts +208 -1
  38. package/dist/themes/theme.js +118 -1
  39. package/dist/ui/base.d.ts +22 -35
  40. package/dist/ui/base.js +388 -3
  41. package/dist/ui/code.d.ts +22 -137
  42. package/dist/ui/code.js +199 -161
  43. package/dist/ui/form.d.ts +8 -6
  44. package/dist/ui/form.js +57 -1
  45. package/dist/ui/icon.d.ts +7 -84
  46. package/dist/ui/icon.js +69 -2
  47. package/dist/ui/password.d.ts +30 -37
  48. package/dist/ui/password.js +340 -237
  49. package/dist/ui/select.d.ts +19 -218
  50. package/dist/ui/select.js +91 -4
  51. package/dist/util.d.ts +71 -1
  52. package/dist/util.js +106 -1
  53. package/package.json +5 -3
  54. package/dist/allow-CixonwTW.d.ts +0 -59
  55. package/dist/allow-DX5cehSc.js +0 -63
  56. package/dist/base-DRutbxgL.js +0 -422
  57. package/dist/code-DJxdFR7p.d.ts +0 -212
  58. package/dist/core-BZHEAefX.d.ts +0 -129
  59. package/dist/core-CDM5o4rs.js +0 -498
  60. package/dist/error-CWAdNAzm.d.ts +0 -243
  61. package/dist/error-DgAKK7b2.js +0 -237
  62. package/dist/form-6XKM_cOk.js +0 -61
  63. package/dist/icon-Ci5uqGB_.js +0 -192
  64. package/dist/keys-EEfxEGfO.js +0 -140
  65. package/dist/oauth2-B7-6Z7Lc.js +0 -155
  66. package/dist/oauth2-CXHukHf2.d.ts +0 -176
  67. package/dist/password-C4KLmO0O.d.ts +0 -385
  68. package/dist/pkce-276Za_rZ.js +0 -162
  69. package/dist/provider-tndlqCzp.d.ts +0 -227
  70. package/dist/random-SXMYlaVr.js +0 -87
  71. package/dist/select-BjySLL8I.js +0 -280
  72. package/dist/storage-BEaqEPNQ.js +0 -62
  73. package/dist/storage-CxKerLlc.d.ts +0 -162
  74. package/dist/subject-DMIMVtaT.d.ts +0 -62
  75. package/dist/theme-C9by7VXf.d.ts +0 -209
  76. package/dist/theme-CswaLtbW.js +0 -120
  77. package/dist/util-CSdHUFOo.js +0 -108
  78. package/dist/util-DbSKG1Xm.d.ts +0 -72
package/dist/pkce.js CHANGED
@@ -1,3 +1,162 @@
1
- import { generatePKCE, validatePKCE } from "./pkce-276Za_rZ.js";
1
+ import { base64url } from "jose";
2
2
 
3
+ //#region src/pkce.ts
4
+ /**
5
+ * Performs a timing-safe comparison of two strings to prevent timing attacks.
6
+ * This implementation is platform-agnostic, uses a constant-time algorithm,
7
+ * and correctly handles all Unicode characters by operating on their UTF-8 byte representation.
8
+ * It always takes a time proportional to the length of the expected string,
9
+ * regardless of where the strings differ, making it safe for comparing sensitive values.
10
+ *
11
+ * @param a - The first string to compare (often the expected, secret value).
12
+ * @param b - The second string to compare (often the user-provided value).
13
+ * @returns True if the strings are identical, false otherwise.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // Safe for comparing sensitive values like PKCE verifiers or tokens
18
+ * const isValid = await timingSafeCompare(receivedVerifier, expectedChallenge);
19
+ *
20
+ * // Safe for password hash verification
21
+ * const isValidPassword = timingSafeCompare(hashedInput, storedHash);
22
+ *
23
+ * // Returns false for different types or lengths without leaking timing info
24
+ * timingSafeCompare("abc", 123 as any); // false
25
+ * timingSafeCompare("abc", "abcd"); // false
26
+ * ```
27
+ */
28
+ const timingSafeCompare = (a, b) => {
29
+ if (typeof a !== "string" || typeof b !== "string") return false;
30
+ const encoder = new TextEncoder();
31
+ const aBytes = encoder.encode(a);
32
+ const bBytes = encoder.encode(b);
33
+ let diff = aBytes.length ^ bBytes.length;
34
+ for (const [i, aByte] of aBytes.entries()) diff |= aByte ^ (bBytes[i] ?? 0);
35
+ return diff === 0;
36
+ };
37
+ /**
38
+ * Generates a cryptographically secure code verifier for PKCE.
39
+ * The verifier is a URL-safe base64-encoded string of random bytes.
40
+ *
41
+ * @param length - Length of the random buffer in bytes
42
+ * @returns Base64url-encoded verifier string
43
+ */
44
+ const generateVerifier = (length) => {
45
+ const buffer = new Uint8Array(length);
46
+ crypto.getRandomValues(buffer);
47
+ return base64url.encode(buffer);
48
+ };
49
+ /**
50
+ * Generates a code challenge from a verifier using the specified method.
51
+ * For 'S256', applies SHA-256 hash then base64url encoding.
52
+ * For 'plain', returns the verifier unchanged (not recommended for production).
53
+ *
54
+ * @param verifier - The code verifier string
55
+ * @param method - Challenge generation method
56
+ * @returns Promise resolving to the code challenge string
57
+ */
58
+ const generateChallenge = async (verifier, method) => {
59
+ if (method === "plain") return verifier;
60
+ const encoder = new TextEncoder();
61
+ const data = encoder.encode(verifier);
62
+ const hash = await crypto.subtle.digest("SHA-256", data);
63
+ return base64url.encode(new Uint8Array(hash));
64
+ };
65
+ /**
66
+ * Generates a complete PKCE challenge for OAuth authorization requests.
67
+ * Creates a cryptographically secure verifier and corresponding S256 challenge.
68
+ * Validates that the generated verifier meets standard requirements (43-128 characters).
69
+ *
70
+ * @param length - Length of the random buffer in bytes (32-96 range to generate 43-128 character verifier)
71
+ * @returns Promise resolving to PKCE challenge data
72
+ *
73
+ * @example
74
+ * ```ts
75
+ * const pkce = await generatePKCE()
76
+ *
77
+ * // Use challenge in authorization URL
78
+ * authUrl.searchParams.set('code_challenge', pkce.challenge)
79
+ * authUrl.searchParams.set('code_challenge_method', pkce.method)
80
+ *
81
+ * // Store verifier for token exchange
82
+ * sessionStorage.setItem('code_verifier', pkce.verifier)
83
+ * ```
84
+ *
85
+ * @throws {RangeError} If length is outside valid range or generated verifier doesn't meet requirements
86
+ */
87
+ const generatePKCE = async (length = 48) => {
88
+ if (!Number.isInteger(length) || length < 32 || length > 96) throw new RangeError("Random buffer length must be between 32 and 96 bytes (generates 43-128 character verifier)");
89
+ const verifier = generateVerifier(length);
90
+ if (verifier.length < 43 || verifier.length > 128) throw new Error("Generated verifier does not meet requirements");
91
+ if (!/^[A-Za-z0-9_-]+$/.test(verifier)) throw new Error("Generated verifier is not valid base64url format");
92
+ const challenge = await generateChallenge(verifier, "S256");
93
+ return {
94
+ verifier,
95
+ challenge,
96
+ method: "S256"
97
+ };
98
+ };
99
+ /**
100
+ * Validates a PKCE code verifier against a previously generated challenge.
101
+ * Uses timing-safe comparison and timing normalization to prevent timing attacks.
102
+ * All validation paths take the same computational time regardless of input validity,
103
+ * making it resistant to timing-based side-channel attacks.
104
+ *
105
+ * @param verifier - The code verifier received from the client
106
+ * @param challenge - The code challenge stored during authorization
107
+ * @param method - The challenge method used during generation
108
+ * @returns Promise resolving to true if verifier matches challenge
109
+ *
110
+ * @example
111
+ * ```ts
112
+ * // During token exchange
113
+ * const isValid = await validatePKCE(
114
+ * receivedVerifier,
115
+ * storedChallenge,
116
+ * 'S256'
117
+ * )
118
+ *
119
+ * if (!isValid) {
120
+ * throw new Error('Invalid PKCE verifier')
121
+ * }
122
+ * ```
123
+ */
124
+ const validatePKCE = async (verifier, challenge, method = "S256") => {
125
+ const MIN_PROCESSING_TIME = 50;
126
+ const RANDOM_JITTER_MAX = 20;
127
+ const startTime = performance.now();
128
+ let isValid = false;
129
+ let hasEarlyFailure = false;
130
+ const normalizedVerifier = String(verifier || "");
131
+ const normalizedChallenge = String(challenge || "");
132
+ const validations = [
133
+ typeof verifier === "string" && typeof challenge === "string" && verifier && challenge,
134
+ normalizedVerifier.length >= 43 && normalizedVerifier.length <= 128,
135
+ normalizedChallenge.length >= 43 && normalizedChallenge.length <= 128,
136
+ /^[A-Za-z0-9_-]+$/.test(normalizedVerifier),
137
+ /^[A-Za-z0-9_-]+$/.test(normalizedChallenge)
138
+ ];
139
+ hasEarlyFailure = !validations.every(Boolean);
140
+ const verifierToUse = hasEarlyFailure ? "dummyverifier_".repeat(6) : normalizedVerifier;
141
+ try {
142
+ const generatedChallenge = await generateChallenge(verifierToUse, method);
143
+ const challengeToCompare = hasEarlyFailure ? "dummychallenge_".repeat(6) : normalizedChallenge;
144
+ const comparisonResult = timingSafeCompare(generatedChallenge, challengeToCompare);
145
+ isValid = !hasEarlyFailure && comparisonResult;
146
+ } catch {
147
+ isValid = false;
148
+ }
149
+ const elapsed = performance.now() - startTime;
150
+ const remainingTime = Math.max(0, MIN_PROCESSING_TIME - elapsed);
151
+ if (remainingTime > 0 || elapsed < MIN_PROCESSING_TIME) {
152
+ const jitterArray = new Uint32Array(1);
153
+ crypto.getRandomValues(jitterArray);
154
+ const jitter = (jitterArray[0] ?? 0) / 4294967295 * RANDOM_JITTER_MAX;
155
+ const totalDelay = Math.max(remainingTime, MIN_PROCESSING_TIME - elapsed) + jitter;
156
+ await new Promise((resolve) => setTimeout(resolve, totalDelay));
157
+ }
158
+ return isValid;
159
+ };
160
+
161
+ //#endregion
3
162
  export { generatePKCE, validatePKCE };
@@ -1,4 +1,228 @@
1
- import "../storage-CxKerLlc.js";
2
- import "../provider-tndlqCzp.js";
3
- import { CodeProvider, CodeProviderConfig, CodeProviderError, CodeProviderOptions, CodeProviderState, CodeUserData } from "../code-DJxdFR7p.js";
1
+ import { Provider } from "./provider.js";
2
+
3
+ //#region src/provider/code.d.ts
4
+
5
+ /**
6
+ * Configuration options for the PIN code authentication provider.
7
+ *
8
+ * @template Claims - Type of claims collected during authentication (email, phone, etc.)
9
+ */
10
+ interface CodeProviderConfig<Claims extends Record<string, string> = Record<string, string>> {
11
+ /**
12
+ * The length of the generated PIN code.
13
+ * Common values are 4, 6, or 8 digits.
14
+ *
15
+ * @default 6
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * {
20
+ * length: 4 // 4-digit PIN for easier entry
21
+ * }
22
+ * ```
23
+ */
24
+ readonly length?: number;
25
+ /**
26
+ * Request handler for rendering the authentication UI.
27
+ * Handles both the initial claim collection and PIN code entry screens.
28
+ *
29
+ * @param req - The HTTP request object
30
+ * @param state - Current authentication state (start or code verification)
31
+ * @param form - Form data from POST requests (if any)
32
+ * @param error - Authentication error to display (if any)
33
+ * @returns Promise resolving to the authentication page response
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * request: async (req, state, form, error) => {
38
+ * if (state.type === 'start') {
39
+ * return new Response(renderClaimForm(form, error))
40
+ * } else {
41
+ * return new Response(renderCodeForm(state.claims.email, error))
42
+ * }
43
+ * }
44
+ * ```
45
+ */
46
+ request: (req: Request, state: CodeProviderState, form?: FormData, error?: CodeProviderError) => Promise<Response>;
47
+ /**
48
+ * Callback for sending PIN codes to users via their preferred method.
49
+ * Should handle delivery via email, SMS, or other communication channels.
50
+ *
51
+ * @param claims - User claims containing contact information
52
+ * @param code - The generated PIN code to send
53
+ * @returns Promise resolving to undefined on success, or error object on failure
54
+ *
55
+ * @example
56
+ * ```ts
57
+ * sendCode: async (claims, code) => {
58
+ * try {
59
+ * if (claims.email) {
60
+ * await emailService.send({
61
+ * to: claims.email,
62
+ * subject: 'Your verification code',
63
+ * text: `Your PIN code is: ${code}`
64
+ * })
65
+ * } else if (claims.phone) {
66
+ * await smsService.send(claims.phone, `PIN: ${code}`)
67
+ * } else {
68
+ * return {
69
+ * type: "invalid_claim",
70
+ * key: "email",
71
+ * value: "Email or phone number is required"
72
+ * }
73
+ * }
74
+ * } catch (error) {
75
+ * return {
76
+ * type: "invalid_claim",
77
+ * key: "delivery",
78
+ * value: "Failed to send code"
79
+ * }
80
+ * }
81
+ * }
82
+ * ```
83
+ */
84
+ sendCode: (claims: Claims, code: string) => Promise<CodeProviderError | undefined>;
85
+ }
86
+ /**
87
+ * Authentication flow states for the PIN code provider.
88
+ * The provider transitions between these states during authentication.
89
+ */
90
+ type CodeProviderState = {
91
+ /** Initial state: user enters their claims (email, phone, etc.) */
92
+ readonly type: "start";
93
+ } | {
94
+ /** Code verification state: user enters the PIN code */
95
+ readonly type: "code";
96
+ /** Whether this is a code resend request */
97
+ readonly resend?: boolean;
98
+ /** The generated PIN code for verification */
99
+ readonly code: string;
100
+ /** User claims collected during the start phase */
101
+ readonly claims: Record<string, string>;
102
+ };
103
+ /**
104
+ * Possible errors during PIN code authentication.
105
+ */
106
+ type CodeProviderError = {
107
+ /** The entered PIN code is incorrect */
108
+ readonly type: "invalid_code";
109
+ } | {
110
+ /** A user claim is invalid or missing */
111
+ readonly type: "invalid_claim";
112
+ /** The claim field that failed validation */
113
+ readonly key: string;
114
+ /** The invalid value or error description */
115
+ readonly value: string;
116
+ };
117
+ /**
118
+ * User data returned by successful PIN code authentication.
119
+ *
120
+ * @template Claims - Type of claims collected during authentication
121
+ */
122
+ interface CodeUserData<Claims extends Record<string, string> = Record<string, string>> {
123
+ /** The verified claims collected during authentication */
124
+ readonly claims: Claims;
125
+ }
126
+ /**
127
+ * Creates a PIN code authentication provider.
128
+ * Implements a flexible claim-based authentication flow with PIN verification.
129
+ *
130
+ * @template Claims - Type of claims to collect (email, phone, username, etc.)
131
+ * @param config - PIN code provider configuration
132
+ * @returns Provider instance implementing PIN code authentication
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * // Email-based PIN authentication
137
+ * const emailCodeProvider = CodeProvider<{ email: string }>({
138
+ * length: 6,
139
+ * request: async (req, state, form, error) => {
140
+ * if (state.type === 'start') {
141
+ * return new Response(renderEmailForm(form?.get('email'), error))
142
+ * } else {
143
+ * return new Response(renderPinForm(state.claims.email, error, state.resend))
144
+ * }
145
+ * },
146
+ * sendCode: async (claims, code) => {
147
+ * if (!claims.email || !isValidEmail(claims.email)) {
148
+ * return {
149
+ * type: "invalid_claim",
150
+ * key: "email",
151
+ * value: "Invalid email address"
152
+ * }
153
+ * }
154
+ *
155
+ * try {
156
+ * await emailService.send(claims.email, `Your verification code: ${code}`)
157
+ * } catch {
158
+ * return {
159
+ * type: "invalid_claim",
160
+ * key: "delivery",
161
+ * value: "Failed to send code"
162
+ * }
163
+ * }
164
+ * }
165
+ * })
166
+ *
167
+ * // Multi-channel PIN authentication (email or phone)
168
+ * const flexibleCodeProvider = CodeProvider<{ email?: string; phone?: string }>({
169
+ * length: 4,
170
+ * request: async (req, state, form, error) => {
171
+ * if (state.type === 'start') {
172
+ * return new Response(renderContactForm(form, error))
173
+ * } else {
174
+ * const contact = state.claims.email || state.claims.phone
175
+ * return new Response(renderPinForm(contact, error))
176
+ * }
177
+ * },
178
+ * sendCode: async (claims, code) => {
179
+ * try {
180
+ * if (claims.email) {
181
+ * await emailService.send(claims.email, `PIN: ${code}`)
182
+ * } else if (claims.phone) {
183
+ * await smsService.send(claims.phone, `PIN: ${code}`)
184
+ * } else {
185
+ * return {
186
+ * type: "invalid_claim",
187
+ * key: "email",
188
+ * value: "Provide either email or phone number"
189
+ * }
190
+ * }
191
+ * } catch {
192
+ * return {
193
+ * type: "invalid_claim",
194
+ * key: "delivery",
195
+ * value: "Failed to send code"
196
+ * }
197
+ * }
198
+ * }
199
+ * })
200
+ *
201
+ * // Usage in issuer
202
+ * export default issuer({
203
+ * providers: {
204
+ * email: emailCodeProvider,
205
+ * flexible: flexibleCodeProvider
206
+ * },
207
+ * success: async (ctx, value) => {
208
+ * if (value.provider === "code") {
209
+ * const email = value.claims.email
210
+ * const phone = value.claims.phone
211
+ *
212
+ * // Look up or create user based on verified claims
213
+ * const userId = await findOrCreateUser({ email, phone })
214
+ *
215
+ * return ctx.subject("user", { userId, email, phone })
216
+ * }
217
+ * }
218
+ * })
219
+ * ```
220
+ */
221
+ declare const CodeProvider: <Claims extends Record<string, string> = Record<string, string>>(config: CodeProviderConfig<Claims>) => Provider<CodeUserData<Claims>>;
222
+ /**
223
+ * Type helper for CodeProvider configuration options.
224
+ * @internal
225
+ */
226
+ type CodeProviderOptions = Parameters<typeof CodeProvider>[0];
227
+ //#endregion
4
228
  export { CodeProvider, CodeProviderConfig, CodeProviderError, CodeProviderOptions, CodeProviderState, CodeUserData };
@@ -1,4 +1,4 @@
1
- import { generateUnbiasedDigits, timingSafeCompare } from "../random-SXMYlaVr.js";
1
+ import { generateUnbiasedDigits, timingSafeCompare } from "../random.js";
2
2
 
3
3
  //#region src/provider/code.ts
4
4
  /**
@@ -30,7 +30,15 @@ import { generateUnbiasedDigits, timingSafeCompare } from "../random-SXMYlaVr.js
30
30
  * }
31
31
  * }
32
32
  *
33
- * await emailService.send(claims.email, `Your verification code: ${code}`)
33
+ * try {
34
+ * await emailService.send(claims.email, `Your verification code: ${code}`)
35
+ * } catch {
36
+ * return {
37
+ * type: "invalid_claim",
38
+ * key: "delivery",
39
+ * value: "Failed to send code"
40
+ * }
41
+ * }
34
42
  * }
35
43
  * })
36
44
  *
@@ -46,15 +54,23 @@ import { generateUnbiasedDigits, timingSafeCompare } from "../random-SXMYlaVr.js
46
54
  * }
47
55
  * },
48
56
  * sendCode: async (claims, code) => {
49
- * if (claims.email) {
50
- * await emailService.send(claims.email, `PIN: ${code}`)
51
- * } else if (claims.phone) {
52
- * await smsService.send(claims.phone, `PIN: ${code}`)
53
- * } else {
57
+ * try {
58
+ * if (claims.email) {
59
+ * await emailService.send(claims.email, `PIN: ${code}`)
60
+ * } else if (claims.phone) {
61
+ * await smsService.send(claims.phone, `PIN: ${code}`)
62
+ * } else {
63
+ * return {
64
+ * type: "invalid_claim",
65
+ * key: "email",
66
+ * value: "Provide either email or phone number"
67
+ * }
68
+ * }
69
+ * } catch {
54
70
  * return {
55
71
  * type: "invalid_claim",
56
- * key: "contact",
57
- * value: "Provide either email or phone number"
72
+ * key: "delivery",
73
+ * value: "Failed to send code"
58
74
  * }
59
75
  * }
60
76
  * }
@@ -124,18 +140,15 @@ const CodeProvider = (config) => {
124
140
  claims,
125
141
  code
126
142
  }, formData);
127
- }
128
- if (action === "verify" && currentState?.type === "code") {
143
+ } else if (action === "verify" && currentState?.type === "code") {
129
144
  const enteredCode = formData.get("code")?.toString();
130
145
  if (!(currentState.code && enteredCode && timingSafeCompare(currentState.code, enteredCode))) return transition(c, {
131
146
  ...currentState,
132
147
  resend: false
133
148
  }, formData, { type: "invalid_code" });
134
149
  await ctx.unset(c, "provider");
135
- const successResponse = await ctx.success(c, { claims: currentState.claims });
136
- return ctx.forward(c, successResponse);
150
+ return await ctx.success(c, { claims: currentState.claims });
137
151
  }
138
- return transition(c, { type: "start" }, formData);
139
152
  });
140
153
  }
141
154
  };
@@ -1,6 +1,5 @@
1
- import "../storage-CxKerLlc.js";
2
- import { Provider } from "../provider-tndlqCzp.js";
3
- import { Oauth2UserData, Oauth2WrappedConfig } from "../oauth2-CXHukHf2.js";
1
+ import { Provider } from "./provider.js";
2
+ import { Oauth2UserData, Oauth2WrappedConfig } from "./oauth2.js";
4
3
 
5
4
  //#region src/provider/facebook.d.ts
6
5
 
@@ -1,8 +1,4 @@
1
- import "../util-CSdHUFOo.js";
2
- import "../error-DgAKK7b2.js";
3
- import "../pkce-276Za_rZ.js";
4
- import "../random-SXMYlaVr.js";
5
- import { Oauth2Provider } from "../oauth2-B7-6Z7Lc.js";
1
+ import { Oauth2Provider } from "./oauth2.js";
6
2
 
7
3
  //#region src/provider/facebook.ts
8
4
  /**
@@ -1,6 +1,5 @@
1
- import "../storage-CxKerLlc.js";
2
- import { Provider } from "../provider-tndlqCzp.js";
3
- import { Oauth2UserData, Oauth2WrappedConfig } from "../oauth2-CXHukHf2.js";
1
+ import { Provider } from "./provider.js";
2
+ import { Oauth2UserData, Oauth2WrappedConfig } from "./oauth2.js";
4
3
 
5
4
  //#region src/provider/github.d.ts
6
5
 
@@ -1,8 +1,4 @@
1
- import "../util-CSdHUFOo.js";
2
- import "../error-DgAKK7b2.js";
3
- import "../pkce-276Za_rZ.js";
4
- import "../random-SXMYlaVr.js";
5
- import { Oauth2Provider } from "../oauth2-B7-6Z7Lc.js";
1
+ import { Oauth2Provider } from "./oauth2.js";
6
2
 
7
3
  //#region src/provider/github.ts
8
4
  /**
@@ -1,6 +1,5 @@
1
- import "../storage-CxKerLlc.js";
2
- import { Provider } from "../provider-tndlqCzp.js";
3
- import { Oauth2UserData, Oauth2WrappedConfig } from "../oauth2-CXHukHf2.js";
1
+ import { Provider } from "./provider.js";
2
+ import { Oauth2UserData, Oauth2WrappedConfig } from "./oauth2.js";
4
3
 
5
4
  //#region src/provider/google.d.ts
6
5
 
@@ -1,8 +1,4 @@
1
- import "../util-CSdHUFOo.js";
2
- import "../error-DgAKK7b2.js";
3
- import "../pkce-276Za_rZ.js";
4
- import "../random-SXMYlaVr.js";
5
- import { Oauth2Provider } from "../oauth2-B7-6Z7Lc.js";
1
+ import { Oauth2Provider } from "./oauth2.js";
6
2
 
7
3
  //#region src/provider/google.ts
8
4
  /**