@withwiz/toolkit 0.4.1 → 0.5.1

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 (50) hide show
  1. package/dist/auth/adapters/prisma/index.d.ts +20 -4
  2. package/dist/auth/adapters/prisma/index.js +51 -61
  3. package/dist/auth/core/jwt/cookie.d.ts +1 -0
  4. package/dist/auth/core/jwt/cookie.js +1 -1
  5. package/dist/auth/core/jwt/index.d.ts +1 -1
  6. package/dist/auth/core/jwt/index.js +1 -1
  7. package/dist/auth/core/jwt/types.js +5 -7
  8. package/dist/auth/core/oauth/index.d.ts +17 -27
  9. package/dist/auth/core/oauth/index.js +18 -5
  10. package/dist/auth/core/oauth/providers/github.d.ts +12 -0
  11. package/dist/auth/core/oauth/providers/github.js +8 -0
  12. package/dist/auth/core/oauth/providers/google.d.ts +12 -0
  13. package/dist/auth/core/oauth/providers/google.js +8 -0
  14. package/dist/auth/core/oauth/providers/index.d.ts +3 -0
  15. package/dist/auth/core/oauth/providers/index.js +17 -0
  16. package/dist/auth/core/oauth/providers/kakao.d.ts +12 -0
  17. package/dist/auth/core/oauth/providers/kakao.js +8 -0
  18. package/dist/auth/core/password/client-helper.js +1 -1
  19. package/dist/auth/core/password/index.js +1 -1
  20. package/dist/auth/index.d.ts +2 -3
  21. package/dist/auth/index.js +35 -24
  22. package/dist/auth/types/index.d.ts +31 -31
  23. package/dist/auth/types/index.js +5 -7
  24. package/dist/chunk-2QQNL4ND.js +62 -0
  25. package/dist/chunk-6PGZTY4N.js +30 -0
  26. package/dist/chunk-GBLNXNEH.js +64 -0
  27. package/dist/chunk-HZLJYEOO.js +92 -0
  28. package/dist/{chunk-N4D6OPPP.js → chunk-LLVIA4JX.js} +4 -2
  29. package/dist/{chunk-5WP57PJK.js → chunk-O3UR234Y.js} +4 -4
  30. package/dist/{chunk-6D3HHYER.js → chunk-QKC73SWB.js} +6 -12
  31. package/dist/chunk-RVL5ROWQ.js +62 -0
  32. package/dist/chunk-T4MDCVUQ.js +0 -0
  33. package/dist/{chunk-J5AISIJS.js → chunk-ZBXSEQ6W.js} +18 -14
  34. package/dist/config/registry.d.ts +42 -0
  35. package/dist/config/registry.js +12 -0
  36. package/dist/constants/index.js +6 -6
  37. package/dist/initialize.d.ts +2 -0
  38. package/dist/initialize.js +18 -10
  39. package/dist/middleware/auth.d.ts +1 -0
  40. package/dist/middleware/auth.js +4 -2
  41. package/dist/middleware/index.d.ts +1 -1
  42. package/dist/middleware/index.js +8 -6
  43. package/dist/middleware/rate-limit.d.ts +3 -7
  44. package/dist/middleware/types.d.ts +1 -1
  45. package/dist/middleware/wrappers.js +4 -4
  46. package/dist/types/geoip.d.ts +4 -4
  47. package/dist/types/qr-code.d.ts +20 -20
  48. package/dist/types/qr-code.js +4 -4
  49. package/package.json +6 -1
  50. package/dist/chunk-V5K5FYU7.js +0 -200
@@ -8,10 +8,24 @@
8
8
  * 패키지 독립성을 위해 덕 타이핑(Duck Typing) 방식으로 PrismaClient를 받습니다.
9
9
  */
10
10
  type PrismaClientLike = Record<string, any>;
11
- import type { UserRepository, OAuthAccountRepository, EmailTokenRepository, BaseUser, CreateUserData, UpdateUserData, OAuthAccount, CreateOAuthAccountData, UpdateOAuthAccountData, EmailToken, TokenType, OAuthProvider } from '@withwiz/auth/types';
11
+ import type { UserRepository, OAuthAccountRepository, EmailTokenRepository, BaseUser, CreateUserData, UpdateUserData, OAuthAccount, CreateOAuthAccountData, UpdateOAuthAccountData, EmailToken, TokenType } from '@withwiz/auth/types';
12
+ export interface PrismaAdapterConfig {
13
+ tokenTables?: {
14
+ emailVerification?: string;
15
+ passwordReset?: string;
16
+ magicLink?: string;
17
+ };
18
+ userFields?: {
19
+ password?: string;
20
+ emailVerified?: string;
21
+ role?: string;
22
+ image?: string;
23
+ };
24
+ }
12
25
  export declare class PrismaUserRepository implements UserRepository {
13
26
  private prisma;
14
- constructor(prisma: PrismaClientLike);
27
+ private config;
28
+ constructor(prisma: PrismaClientLike, config?: PrismaAdapterConfig);
15
29
  findById(id: string): Promise<BaseUser | null>;
16
30
  findByEmail(email: string): Promise<BaseUser | null>;
17
31
  create(data: CreateUserData): Promise<BaseUser>;
@@ -24,7 +38,7 @@ export declare class PrismaUserRepository implements UserRepository {
24
38
  export declare class PrismaOAuthAccountRepository implements OAuthAccountRepository {
25
39
  private prisma;
26
40
  constructor(prisma: PrismaClientLike);
27
- findByProvider(provider: OAuthProvider, providerAccountId: string): Promise<OAuthAccount | null>;
41
+ findByProvider(provider: string, providerAccountId: string): Promise<OAuthAccount | null>;
28
42
  findByUserId(userId: string): Promise<OAuthAccount[]>;
29
43
  create(data: CreateOAuthAccountData): Promise<OAuthAccount>;
30
44
  update(id: string, data: UpdateOAuthAccountData): Promise<OAuthAccount>;
@@ -33,7 +47,9 @@ export declare class PrismaOAuthAccountRepository implements OAuthAccountReposit
33
47
  }
34
48
  export declare class PrismaEmailTokenRepository implements EmailTokenRepository {
35
49
  private prisma;
36
- constructor(prisma: PrismaClientLike);
50
+ private config;
51
+ constructor(prisma: PrismaClientLike, config?: PrismaAdapterConfig);
52
+ private getTokenTable;
37
53
  create(email: string, token: string, type: TokenType, expiresAt: Date): Promise<EmailToken>;
38
54
  findByEmailAndToken(email: string, token: string, type: TokenType): Promise<EmailToken | null>;
39
55
  delete(email: string, token: string, type: TokenType): Promise<void>;
@@ -1,9 +1,31 @@
1
- import "../../../chunk-ORMEWXMH.js";
1
+ import {
2
+ __spreadValues
3
+ } from "../../../chunk-ORMEWXMH.js";
2
4
 
3
5
  // src/auth/adapters/prisma/index.ts
6
+ var DEFAULT_CONFIG = {
7
+ tokenTables: {
8
+ emailVerification: "emailVerificationToken",
9
+ passwordReset: "passwordResetToken",
10
+ magicLink: "magicLinkToken"
11
+ },
12
+ userFields: {
13
+ password: "password",
14
+ emailVerified: "emailVerified",
15
+ role: "role",
16
+ image: "image"
17
+ }
18
+ };
19
+ function mergeConfig(config) {
20
+ return {
21
+ tokenTables: __spreadValues(__spreadValues({}, DEFAULT_CONFIG.tokenTables), config == null ? void 0 : config.tokenTables),
22
+ userFields: __spreadValues(__spreadValues({}, DEFAULT_CONFIG.userFields), config == null ? void 0 : config.userFields)
23
+ };
24
+ }
4
25
  var PrismaUserRepository = class {
5
- constructor(prisma) {
26
+ constructor(prisma, config) {
6
27
  this.prisma = prisma;
28
+ this.config = mergeConfig(config);
7
29
  }
8
30
  async findById(id) {
9
31
  const user = await this.prisma.user.findUnique({ where: { id } });
@@ -61,10 +83,10 @@ var PrismaUserRepository = class {
61
83
  id: user.id,
62
84
  email: user.email,
63
85
  name: user.name,
64
- role: user.role,
65
- emailVerified: user.emailVerified,
86
+ role: user[this.config.userFields.role],
87
+ emailVerified: user[this.config.userFields.emailVerified],
66
88
  isActive: user.isActive,
67
- image: user.image,
89
+ image: user[this.config.userFields.image],
68
90
  createdAt: user.createdAt,
69
91
  updatedAt: user.updatedAt
70
92
  };
@@ -171,30 +193,27 @@ var PrismaOAuthAccountRepository = class {
171
193
  }
172
194
  };
173
195
  var PrismaEmailTokenRepository = class {
174
- constructor(prisma) {
196
+ constructor(prisma, config) {
175
197
  this.prisma = prisma;
198
+ this.config = mergeConfig(config);
176
199
  }
177
- async create(email, token, type, expiresAt) {
178
- let result;
200
+ getTokenTable(type) {
179
201
  switch (type) {
180
202
  case "EMAIL_VERIFICATION":
181
- result = await this.prisma.emailVerificationToken.create({
182
- data: { email, token, expires: expiresAt }
183
- });
184
- break;
203
+ return this.config.tokenTables.emailVerification;
185
204
  case "PASSWORD_RESET":
186
- result = await this.prisma.passwordResetToken.create({
187
- data: { email, token, expires: expiresAt }
188
- });
189
- break;
205
+ return this.config.tokenTables.passwordReset;
190
206
  case "MAGIC_LINK":
191
- result = await this.prisma.magicLinkToken.create({
192
- data: { email, token, expires: expiresAt, used: false }
193
- });
194
- break;
207
+ return this.config.tokenTables.magicLink;
195
208
  default:
196
209
  throw new Error(`Unsupported token type: ${type}`);
197
210
  }
211
+ }
212
+ async create(email, token, type, expiresAt) {
213
+ const tableName = this.getTokenTable(type);
214
+ const data = { email, token, expires: expiresAt };
215
+ if (type === "MAGIC_LINK") data.used = false;
216
+ const result = await this.prisma[tableName].create({ data });
198
217
  return {
199
218
  id: result.id,
200
219
  email: result.email,
@@ -206,26 +225,10 @@ var PrismaEmailTokenRepository = class {
206
225
  };
207
226
  }
208
227
  async findByEmailAndToken(email, token, type) {
209
- let result;
210
- switch (type) {
211
- case "EMAIL_VERIFICATION":
212
- result = await this.prisma.emailVerificationToken.findFirst({
213
- where: { email, token }
214
- });
215
- break;
216
- case "PASSWORD_RESET":
217
- result = await this.prisma.passwordResetToken.findFirst({
218
- where: { email, token }
219
- });
220
- break;
221
- case "MAGIC_LINK":
222
- result = await this.prisma.magicLinkToken.findFirst({
223
- where: { email, token }
224
- });
225
- break;
226
- default:
227
- throw new Error(`Unsupported token type: ${type}`);
228
- }
228
+ const tableName = this.getTokenTable(type);
229
+ const result = await this.prisma[tableName].findFirst({
230
+ where: { email, token }
231
+ });
229
232
  if (!result) return null;
230
233
  return {
231
234
  id: result.id,
@@ -238,40 +241,27 @@ var PrismaEmailTokenRepository = class {
238
241
  };
239
242
  }
240
243
  async delete(email, token, type) {
241
- switch (type) {
242
- case "EMAIL_VERIFICATION":
243
- await this.prisma.emailVerificationToken.deleteMany({
244
- where: { email, token }
245
- });
246
- break;
247
- case "PASSWORD_RESET":
248
- await this.prisma.passwordResetToken.deleteMany({
249
- where: { email, token }
250
- });
251
- break;
252
- case "MAGIC_LINK":
253
- await this.prisma.magicLinkToken.deleteMany({
254
- where: { email, token }
255
- });
256
- break;
257
- }
244
+ const tableName = this.getTokenTable(type);
245
+ await this.prisma[tableName].deleteMany({
246
+ where: { email, token }
247
+ });
258
248
  }
259
249
  async deleteExpired() {
260
250
  const now = /* @__PURE__ */ new Date();
261
251
  await Promise.all([
262
- this.prisma.emailVerificationToken.deleteMany({
252
+ this.prisma[this.config.tokenTables.emailVerification].deleteMany({
263
253
  where: { expires: { lt: now } }
264
254
  }),
265
- this.prisma.passwordResetToken.deleteMany({
255
+ this.prisma[this.config.tokenTables.passwordReset].deleteMany({
266
256
  where: { expires: { lt: now } }
267
257
  }),
268
- this.prisma.magicLinkToken.deleteMany({
258
+ this.prisma[this.config.tokenTables.magicLink].deleteMany({
269
259
  where: { expires: { lt: now } }
270
260
  })
271
261
  ]);
272
262
  }
273
263
  async markAsUsed(id) {
274
- await this.prisma.magicLinkToken.update({
264
+ await this.prisma[this.config.tokenTables.magicLink].update({
275
265
  where: { id },
276
266
  data: { used: true }
277
267
  });
@@ -15,6 +15,7 @@ export interface CookieOptions {
15
15
  secure?: boolean;
16
16
  sameSite?: 'lax' | 'strict' | 'none';
17
17
  domain?: string;
18
+ refreshTokenPath?: string;
18
19
  }
19
20
  export declare function setTokenCookies<T extends CookieSettableResponse>(response: T, tokenPair: TokenPair, options?: CookieOptions): T;
20
21
  export declare function clearTokenCookies<T extends CookieSettableResponse>(response: T, options?: CookieOptions): T;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  clearTokenCookies,
3
3
  setTokenCookies
4
- } from "../../../chunk-N4D6OPPP.js";
4
+ } from "../../../chunk-LLVIA4JX.js";
5
5
  import "../../../chunk-SFPMFVSD.js";
6
6
  import "../../../chunk-K25ICPU4.js";
7
7
  import "../../../chunk-2QH66EVQ.js";
@@ -56,7 +56,7 @@ export declare class JWTManager {
56
56
  extractUserFromPayload(payload: JWTPayload): {
57
57
  id: string;
58
58
  email: string;
59
- role: import("@withwiz/auth/types").UserRole;
59
+ role: string;
60
60
  };
61
61
  }
62
62
  /**
@@ -5,7 +5,7 @@ import {
5
5
  import {
6
6
  clearTokenCookies,
7
7
  setTokenCookies
8
- } from "../../../chunk-N4D6OPPP.js";
8
+ } from "../../../chunk-LLVIA4JX.js";
9
9
  import "../../../chunk-AIH3F7JV.js";
10
10
  import "../../../chunk-SFPMFVSD.js";
11
11
  import "../../../chunk-K25ICPU4.js";
@@ -1,13 +1,11 @@
1
1
  import {
2
- OAuthProvider,
2
+ OAUTH_PROVIDERS,
3
3
  PasswordStrength,
4
- TokenType,
5
- UserRole
6
- } from "../../../chunk-6D3HHYER.js";
4
+ TokenType
5
+ } from "../../../chunk-QKC73SWB.js";
7
6
  import "../../../chunk-ORMEWXMH.js";
8
7
  export {
9
- OAuthProvider,
8
+ OAUTH_PROVIDERS,
10
9
  PasswordStrength,
11
- TokenType,
12
- UserRole
10
+ TokenType
13
11
  };
@@ -2,50 +2,40 @@
2
2
  * Shared Auth - OAuth Module
3
3
  *
4
4
  * OAuth 2.0 인증 모듈 (프레임워크 독립적)
5
- * Google, GitHub 지원
5
+ * 플러그인 기반 프로바이더 레지스트리 패턴
6
6
  */
7
- import type { OAuthConfig, OAuthUserInfo, Logger } from '@withwiz/auth/types';
8
- import { OAuthProvider } from '@withwiz/auth/types';
9
- export { OAuthProvider };
7
+ import type { OAuthConfig, OAuthUserInfo, Logger, IOAuthProviderAdapter } from '@withwiz/auth/types';
8
+ import { OAUTH_PROVIDERS } from '@withwiz/auth/types';
9
+ export { OAUTH_PROVIDERS };
10
+ export { GoogleOAuthProvider, GitHubOAuthProvider, KakaoOAuthProvider } from './providers';
10
11
  export declare class OAuthManager {
11
12
  private config;
12
13
  private logger;
14
+ private providers;
13
15
  constructor(config: OAuthConfig, logger: Logger);
14
16
  /**
15
- * OAuth 로그인 URL 생성
16
- */
17
- getLoginUrl(provider: OAuthProvider, state: string): string;
18
- /**
19
- * Google OAuth 로그인 URL
17
+ * 프로바이더 어댑터 등록
20
18
  */
21
- private getGoogleLoginUrl;
19
+ registerProvider(provider: IOAuthProviderAdapter): void;
22
20
  /**
23
- * GitHub OAuth 로그인 URL
21
+ * OAuth 로그인 URL 생성
24
22
  */
25
- private getGitHubLoginUrl;
23
+ getLoginUrl(providerName: string, state: string): string;
26
24
  /**
27
25
  * 인증 코드를 액세스 토큰으로 교환
28
26
  */
29
- exchangeCodeForToken(provider: OAuthProvider, code: string): Promise<string>;
30
- /**
31
- * Google 코드 교환
32
- */
33
- private exchangeGoogleCode;
34
- /**
35
- * GitHub 코드 교환
36
- */
37
- private exchangeGitHubCode;
27
+ exchangeCodeForToken(providerName: string, code: string): Promise<string>;
38
28
  /**
39
29
  * 사용자 정보 가져오기
40
30
  */
41
- getUserInfo(provider: OAuthProvider, accessToken: string): Promise<OAuthUserInfo>;
31
+ getUserInfo(providerName: string, accessToken: string): Promise<OAuthUserInfo>;
42
32
  /**
43
- * Google 사용자 정보
33
+ * 프로바이더 어댑터 조회
44
34
  */
45
- private getGoogleUserInfo;
35
+ private getProvider;
46
36
  /**
47
- * GitHub 사용자 정보
37
+ * 프로바이더 설정 조회
48
38
  */
49
- private getGitHubUserInfo;
39
+ private getProviderConfig;
50
40
  }
51
- export type { OAuthConfig, OAuthUserInfo, OAuthTokenResponse } from '@withwiz/auth/types';
41
+ export type { OAuthConfig, OAuthUserInfo, OAuthTokenResponse, IOAuthProviderAdapter, OAuthProviderConfig } from '@withwiz/auth/types';
@@ -1,12 +1,25 @@
1
1
  import {
2
2
  OAuthManager
3
- } from "../../../chunk-V5K5FYU7.js";
3
+ } from "../../../chunk-HZLJYEOO.js";
4
+ import "../../../chunk-T4MDCVUQ.js";
4
5
  import {
5
- OAuthProvider
6
- } from "../../../chunk-6D3HHYER.js";
6
+ KakaoOAuthProvider
7
+ } from "../../../chunk-2QQNL4ND.js";
8
+ import {
9
+ GitHubOAuthProvider
10
+ } from "../../../chunk-GBLNXNEH.js";
11
+ import {
12
+ GoogleOAuthProvider
13
+ } from "../../../chunk-RVL5ROWQ.js";
14
+ import {
15
+ OAUTH_PROVIDERS
16
+ } from "../../../chunk-QKC73SWB.js";
7
17
  import "../../../chunk-AIH3F7JV.js";
8
18
  import "../../../chunk-ORMEWXMH.js";
9
19
  export {
10
- OAuthManager,
11
- OAuthProvider
20
+ GitHubOAuthProvider,
21
+ GoogleOAuthProvider,
22
+ KakaoOAuthProvider,
23
+ OAUTH_PROVIDERS,
24
+ OAuthManager
12
25
  };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * GitHub OAuth Provider Adapter
3
+ *
4
+ * GitHub OAuth 2.0 인증 어댑터
5
+ */
6
+ import type { IOAuthProviderAdapter, OAuthProviderConfig, OAuthUserInfo, OAuthTokenResponse } from '@withwiz/auth/types';
7
+ export declare class GitHubOAuthProvider implements IOAuthProviderAdapter {
8
+ readonly name = "github";
9
+ getLoginUrl(config: OAuthProviderConfig, state?: string): string;
10
+ exchangeCodeForToken(config: OAuthProviderConfig, code: string): Promise<OAuthTokenResponse>;
11
+ getUserInfo(accessToken: string): Promise<OAuthUserInfo>;
12
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ GitHubOAuthProvider
3
+ } from "../../../../chunk-GBLNXNEH.js";
4
+ import "../../../../chunk-AIH3F7JV.js";
5
+ import "../../../../chunk-ORMEWXMH.js";
6
+ export {
7
+ GitHubOAuthProvider
8
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Google OAuth Provider Adapter
3
+ *
4
+ * Google OAuth 2.0 인증 어댑터
5
+ */
6
+ import type { IOAuthProviderAdapter, OAuthProviderConfig, OAuthUserInfo, OAuthTokenResponse } from '@withwiz/auth/types';
7
+ export declare class GoogleOAuthProvider implements IOAuthProviderAdapter {
8
+ readonly name = "google";
9
+ getLoginUrl(config: OAuthProviderConfig, state?: string): string;
10
+ exchangeCodeForToken(config: OAuthProviderConfig, code: string): Promise<OAuthTokenResponse>;
11
+ getUserInfo(accessToken: string): Promise<OAuthUserInfo>;
12
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ GoogleOAuthProvider
3
+ } from "../../../../chunk-RVL5ROWQ.js";
4
+ import "../../../../chunk-AIH3F7JV.js";
5
+ import "../../../../chunk-ORMEWXMH.js";
6
+ export {
7
+ GoogleOAuthProvider
8
+ };
@@ -0,0 +1,3 @@
1
+ export { GoogleOAuthProvider } from './google';
2
+ export { GitHubOAuthProvider } from './github';
3
+ export { KakaoOAuthProvider } from './kakao';
@@ -0,0 +1,17 @@
1
+ import "../../../../chunk-T4MDCVUQ.js";
2
+ import {
3
+ KakaoOAuthProvider
4
+ } from "../../../../chunk-2QQNL4ND.js";
5
+ import {
6
+ GitHubOAuthProvider
7
+ } from "../../../../chunk-GBLNXNEH.js";
8
+ import {
9
+ GoogleOAuthProvider
10
+ } from "../../../../chunk-RVL5ROWQ.js";
11
+ import "../../../../chunk-AIH3F7JV.js";
12
+ import "../../../../chunk-ORMEWXMH.js";
13
+ export {
14
+ GitHubOAuthProvider,
15
+ GoogleOAuthProvider,
16
+ KakaoOAuthProvider
17
+ };
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Kakao OAuth Provider Adapter
3
+ *
4
+ * Kakao OAuth 2.0 인증 어댑터
5
+ */
6
+ import type { IOAuthProviderAdapter, OAuthProviderConfig, OAuthUserInfo, OAuthTokenResponse } from '@withwiz/auth/types';
7
+ export declare class KakaoOAuthProvider implements IOAuthProviderAdapter {
8
+ readonly name = "kakao";
9
+ getLoginUrl(config: OAuthProviderConfig, state?: string): string;
10
+ exchangeCodeForToken(config: OAuthProviderConfig, code: string): Promise<OAuthTokenResponse>;
11
+ getUserInfo(accessToken: string): Promise<OAuthUserInfo>;
12
+ }
@@ -0,0 +1,8 @@
1
+ import {
2
+ KakaoOAuthProvider
3
+ } from "../../../../chunk-2QQNL4ND.js";
4
+ import "../../../../chunk-AIH3F7JV.js";
5
+ import "../../../../chunk-ORMEWXMH.js";
6
+ export {
7
+ KakaoOAuthProvider
8
+ };
@@ -12,7 +12,7 @@ import {
12
12
  PasswordHasher,
13
13
  PasswordValidator
14
14
  } from "../../../chunk-IHXRF3BH.js";
15
- import "../../../chunk-6D3HHYER.js";
15
+ import "../../../chunk-QKC73SWB.js";
16
16
  import "../../../chunk-ORMEWXMH.js";
17
17
  export {
18
18
  DEFAULT_PASSWORD_CONFIG,
@@ -4,7 +4,7 @@ import {
4
4
  defaultPasswordSchema,
5
5
  strongPasswordSchema
6
6
  } from "../../../chunk-IHXRF3BH.js";
7
- import "../../../chunk-6D3HHYER.js";
7
+ import "../../../chunk-QKC73SWB.js";
8
8
  import "../../../chunk-ORMEWXMH.js";
9
9
  export {
10
10
  PasswordHasher,
@@ -15,7 +15,6 @@ export { JWTClientManager, getStoredTokens, storeTokens, clearStoredTokens, clea
15
15
  export { PasswordValidator, PasswordHasher, defaultPasswordSchema, strongPasswordSchema, } from './core/password';
16
16
  export type { PasswordValidationResult, PasswordConfig } from './core/password';
17
17
  export { DEFAULT_PASSWORD_CONFIG, createPasswordValidator, validatePassword, getPasswordStrength, createPasswordSchema, passwordValidator, createPasswordHasher, } from './core/password/client-helper';
18
- export { OAuthManager } from './core/oauth';
19
- export type { OAuthConfig, OAuthUserInfo, OAuthTokenResponse } from './core/oauth';
18
+ export { OAuthManager, GoogleOAuthProvider, GitHubOAuthProvider, KakaoOAuthProvider } from './core/oauth';
20
19
  export { TokenGenerator } from './core/email/token-generator';
21
- export { UserRole, PasswordStrength, OAuthProvider, TokenType } from './types';
20
+ export { PasswordStrength, OAUTH_PROVIDERS, TokenType } from './types';
@@ -1,6 +1,32 @@
1
+ import {
2
+ JWTClientManager,
3
+ clearStoredTokens,
4
+ clearTokens,
5
+ createApiHeaders,
6
+ createAuthHeader,
7
+ decodeJWTPayload,
8
+ extractUserFromToken,
9
+ getStoredTokens,
10
+ getTokenExpirationString,
11
+ getTokenIssuedAtString,
12
+ getTokenRemainingTime,
13
+ isTokenExpired,
14
+ isTokenExpiringSoon,
15
+ storeTokens
16
+ } from "../chunk-XRRPEBKB.js";
1
17
  import {
2
18
  OAuthManager
3
- } from "../chunk-V5K5FYU7.js";
19
+ } from "../chunk-HZLJYEOO.js";
20
+ import "../chunk-T4MDCVUQ.js";
21
+ import {
22
+ KakaoOAuthProvider
23
+ } from "../chunk-2QQNL4ND.js";
24
+ import {
25
+ GitHubOAuthProvider
26
+ } from "../chunk-GBLNXNEH.js";
27
+ import {
28
+ GoogleOAuthProvider
29
+ } from "../chunk-RVL5ROWQ.js";
4
30
  import {
5
31
  DEFAULT_PASSWORD_CONFIG,
6
32
  createPasswordHasher,
@@ -16,36 +42,19 @@ import {
16
42
  defaultPasswordSchema,
17
43
  strongPasswordSchema
18
44
  } from "../chunk-IHXRF3BH.js";
19
- import {
20
- JWTClientManager,
21
- clearStoredTokens,
22
- clearTokens,
23
- createApiHeaders,
24
- createAuthHeader,
25
- decodeJWTPayload,
26
- extractUserFromToken,
27
- getStoredTokens,
28
- getTokenExpirationString,
29
- getTokenIssuedAtString,
30
- getTokenRemainingTime,
31
- isTokenExpired,
32
- isTokenExpiringSoon,
33
- storeTokens
34
- } from "../chunk-XRRPEBKB.js";
35
45
  import {
36
46
  TokenGenerator
37
47
  } from "../chunk-GDWEDUHO.js";
38
48
  import {
39
- OAuthProvider,
49
+ OAUTH_PROVIDERS,
40
50
  PasswordStrength,
41
- TokenType,
42
- UserRole
43
- } from "../chunk-6D3HHYER.js";
51
+ TokenType
52
+ } from "../chunk-QKC73SWB.js";
44
53
  import {
45
54
  JWTManager,
46
55
  JWTService
47
56
  } from "../chunk-3GAY2T2A.js";
48
- import "../chunk-N4D6OPPP.js";
57
+ import "../chunk-LLVIA4JX.js";
49
58
  import {
50
59
  AUTH_ERROR_CODES,
51
60
  AuthError,
@@ -63,20 +72,22 @@ export {
63
72
  AuthError,
64
73
  DEFAULT_PASSWORD_CONFIG,
65
74
  EmailError,
75
+ GitHubOAuthProvider,
76
+ GoogleOAuthProvider,
66
77
  JWTClientManager,
67
78
  JWTError,
68
79
  JWTManager,
69
80
  JWTService,
81
+ KakaoOAuthProvider,
82
+ OAUTH_PROVIDERS,
70
83
  OAuthError,
71
84
  OAuthManager,
72
- OAuthProvider,
73
85
  PasswordError,
74
86
  PasswordHasher,
75
87
  PasswordStrength,
76
88
  PasswordValidator,
77
89
  TokenGenerator,
78
90
  TokenType,
79
- UserRole,
80
91
  clearStoredTokens,
81
92
  clearTokens,
82
93
  createApiHeaders,