@spfn/auth 0.2.0-beta.61 → 0.2.0-beta.64

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.
package/README.md CHANGED
@@ -1540,10 +1540,12 @@ OAuth 세션 완료. 인터셉터가 pending session에서 full session을 생
1540
1540
  **Response:**
1541
1541
  ```typescript
1542
1542
  {
1543
- providers: ('google' | 'github' | 'kakao' | 'naver')[];
1543
+ providers: ('google' | 'github' | 'kakao' | 'naver' | 'superself')[];
1544
1544
  }
1545
1545
  ```
1546
1546
 
1547
+ > 등록(`registerOAuthProvider`)되고 `isEnabled()`가 true인 provider만 반환됩니다.
1548
+
1547
1549
  ---
1548
1550
 
1549
1551
  ### Google API Access
@@ -1585,6 +1587,62 @@ const data = await response.json();
1585
1587
 
1586
1588
  ---
1587
1589
 
1590
+ ### Custom OAuth Providers (Pluggable)
1591
+
1592
+ OAuth provider 분기는 하드코딩이 아니라 **registry 기반**입니다. 내장 `google` provider는 패키지 로드 시 자기 등록되며, 외부 패키지(예: `@superself/auth`)는 `registerOAuthProvider()`로 런타임에 provider를 끼울 수 있습니다.
1593
+
1594
+ #### `OAuthProvider` 인터페이스
1595
+
1596
+ ```typescript
1597
+ import type { OAuthProvider, NormalizedIdentity, OAuthTokens } from '@spfn/auth/server';
1598
+
1599
+ interface NormalizedIdentity {
1600
+ providerUserId: string;
1601
+ email: string | null;
1602
+ emailVerified: boolean;
1603
+ name?: string;
1604
+ avatar?: string;
1605
+ }
1606
+
1607
+ interface OAuthTokens {
1608
+ accessToken: string;
1609
+ refreshToken?: string;
1610
+ expiresIn: number; // seconds
1611
+ }
1612
+
1613
+ interface OAuthProvider {
1614
+ id: SocialProvider; // SOCIAL_PROVIDERS 중 하나
1615
+ isEnabled(): boolean; // 필수 설정 충족 여부
1616
+ getAuthUrl(state: string, scopes?: string[]): string; // authorize URL 생성
1617
+ exchangeCodeForTokens(code: string): Promise<OAuthTokens>; // code → token
1618
+ getUserInfo(accessToken: string): Promise<NormalizedIdentity>; // 사용자 정보 정규화
1619
+ refreshTokens?(refreshToken: string): Promise<OAuthTokens>; // (선택) 토큰 갱신
1620
+ }
1621
+ ```
1622
+
1623
+ #### 등록 API
1624
+
1625
+ ```typescript
1626
+ import { registerOAuthProvider, getOAuthProvider, getRegisteredProviders } from '@spfn/auth/server';
1627
+
1628
+ registerOAuthProvider(myProvider); // 동일 id 재등록 시 override
1629
+ getOAuthProvider('superself'); // OAuthProvider | undefined
1630
+ getRegisteredProviders(); // OAuthProvider[]
1631
+ ```
1632
+
1633
+ provider를 등록하면 범용 시작 엔드포인트 `POST /_auth/oauth/start`(및 `oauthStartService`/`oauthCallbackService`)가 자동으로 해당 provider를 처리합니다.
1634
+
1635
+ #### 통합 계약 ⚠️
1636
+
1637
+ - **콜백 route는 소비 측 책임**입니다. 이 패키지는 `GET /_auth/oauth/google/callback`(google 고정)만 제공합니다. 커스텀 provider는 자신의 콜백 route에서 `oauthCallbackService({ provider, code, state })`를 호출해야 흐름이 완결됩니다.
1638
+ - **콜백 route는 `Transactional()`로 감싸세요.** `oauthCallbackService`는 사용자 생성/연결과 소셜 계정 저장을 순차로 수행하므로, 중간 실패 시 orphan user가 남지 않으려면 트랜잭션이 필요합니다. (내장 google 콜백 route도 `.use([Transactional()])`를 사용합니다.)
1639
+ - `SOCIAL_PROVIDERS` enum에 provider id가 포함되어 있어야 합니다. (현재: `google`, `github`, `kakao`, `naver`, `superself`)
1640
+ - 등록은 모듈 로드 시점의 side-effect입니다. 번들러에서 `package.json`에 `"sideEffects": false`를 추가하면 내장 google 등록이 tree-shake될 수 있으니 주의하세요.
1641
+
1642
+ > **이벤트 영향**: `auth.login` / `auth.register` 이벤트의 `provider` 필드에 이제 모든 `SOCIAL_PROVIDERS` 값이 들어올 수 있습니다. 구독자의 `switch(provider)`에 새 값 처리를 추가하세요.
1643
+
1644
+ ---
1645
+
1588
1646
  ### Security
1589
1647
 
1590
1648
  - **State 암호화**: JWE (A256GCM)로 state 파라미터 암호화. CSRF 방지용 nonce 포함.
@@ -1,5 +1,5 @@
1
1
  import * as _spfn_core_route from '@spfn/core/route';
2
- import { K as KeyAlgorithmType, d as SocialProvider } from './types-B1CzVZkU.js';
2
+ import { K as KeyAlgorithmType, d as SocialProvider } from './types-B4auHIax.js';
3
3
  import * as _sinclair_typebox from '@sinclair/typebox';
4
4
  import { Static } from '@sinclair/typebox';
5
5
  import { User } from '@spfn/auth/server';
@@ -364,6 +364,88 @@ declare function issueOneTimeTokenService(userId: string): Promise<IssueOneTimeT
364
364
  */
365
365
  declare function verifyOneTimeTokenService(token: string): Promise<string | null>;
366
366
 
367
+ /**
368
+ * OAuth Provider 추상화
369
+ *
370
+ * Provider별로 하드코딩된 분기를 제거하기 위한 공통 인터페이스와 registry.
371
+ * - 내장 provider(google)는 패키지 로드 시점에 자기 등록(dogfood)
372
+ * - 외부 패키지(@superself/auth 등)는 registerOAuthProvider()로 런타임 등록
373
+ *
374
+ * @spfn/auth는 토큰 issuer가 아니라 소비(client) 측이므로,
375
+ * 이 추상화는 "authorize URL 생성 → code 교환 → 사용자 정보 정규화"까지만 다룬다.
376
+ */
377
+
378
+ /**
379
+ * Provider 사용자 정보를 공통 형태로 정규화한 신원
380
+ *
381
+ * provider별 응답 형태(snake_case 등)를 service에 노출하지 않기 위한 경계.
382
+ */
383
+ interface NormalizedIdentity {
384
+ providerUserId: string;
385
+ email: string | null;
386
+ emailVerified: boolean;
387
+ name?: string;
388
+ avatar?: string;
389
+ }
390
+ /**
391
+ * 정규화된 OAuth 토큰 응답
392
+ *
393
+ * @property expiresIn - access token 만료까지 남은 초(seconds)
394
+ */
395
+ interface OAuthTokens {
396
+ accessToken: string;
397
+ refreshToken?: string;
398
+ expiresIn: number;
399
+ }
400
+ /**
401
+ * OAuth provider 구현 인터페이스
402
+ *
403
+ * google, superself 등 모든 provider가 이 형태를 만족해야 registry에 등록된다.
404
+ */
405
+ interface OAuthProvider {
406
+ id: SocialProvider;
407
+ /**
408
+ * provider가 사용 가능한 상태인지(필수 env 등) 확인
409
+ */
410
+ isEnabled(): boolean;
411
+ /**
412
+ * provider 로그인 페이지로 보낼 authorization URL 생성
413
+ *
414
+ * @param state - CSRF 방지용 암호화 state
415
+ * @param scopes - 요청할 scope (미지정 시 provider 기본값)
416
+ */
417
+ getAuthUrl(state: string, scopes?: string[]): string;
418
+ /**
419
+ * authorization code를 토큰으로 교환
420
+ */
421
+ exchangeCodeForTokens(code: string): Promise<OAuthTokens>;
422
+ /**
423
+ * access token으로 사용자 정보를 조회하고 공통 형태로 정규화
424
+ */
425
+ getUserInfo(accessToken: string): Promise<NormalizedIdentity>;
426
+ /**
427
+ * refresh token으로 access token 갱신 (provider가 지원하는 경우)
428
+ *
429
+ * 저장된 provider 토큰을 이후 API 호출에 재사용할 때 사용한다.
430
+ * 미구현 provider는 갱신 불가로 간주한다.
431
+ */
432
+ refreshTokens?(refreshToken: string): Promise<OAuthTokens>;
433
+ }
434
+ /**
435
+ * OAuth provider 등록 (public)
436
+ *
437
+ * 동일 id로 다시 등록하면 덮어쓴다(외부 패키지의 override 허용).
438
+ */
439
+ declare function registerOAuthProvider(provider: OAuthProvider): void;
440
+ /**
441
+ * 등록된 provider 조회. 미등록이면 undefined.
442
+ */
443
+ declare function getOAuthProvider(id: SocialProvider): OAuthProvider | undefined;
444
+ /**
445
+ * 등록된 모든 provider 목록
446
+ */
447
+ declare function getRegisteredProviders(): OAuthProvider[];
448
+
367
449
  /**
368
450
  * @spfn/auth - OAuth Service
369
451
  *
@@ -396,6 +478,13 @@ interface OAuthCallbackResult {
396
478
  keyId: string;
397
479
  isNewUser: boolean;
398
480
  }
481
+ /**
482
+ * registry에서 provider를 찾아 사용 가능한지 검증 후 반환
483
+ *
484
+ * 미등록과 비활성을 구분해 디버깅 신호를 남긴다.
485
+ * 라우트 레이어에서도 재사용한다(중복 조회/non-null 단언 제거).
486
+ */
487
+ declare function requireEnabledProvider(provider: SocialProvider): OAuthProvider;
399
488
  /**
400
489
  * OAuth 로그인 시작 - Provider 로그인 페이지로 리다이렉트할 URL 생성
401
490
  *
@@ -414,11 +503,11 @@ declare function oauthCallbackService(params: OAuthCallbackParams): Promise<OAut
414
503
  */
415
504
  declare function buildOAuthErrorUrl(error: string): string;
416
505
  /**
417
- * OAuth provider가 활성화되어 있는지 확인
506
+ * OAuth provider가 등록되어 있고 활성화되어 있는지 확인
418
507
  */
419
508
  declare function isOAuthProviderEnabled(provider: SocialProvider): boolean;
420
509
  /**
421
- * 활성화된 모든 OAuth provider 목록
510
+ * 활성화된 모든 OAuth provider 목록 (registry 기반)
422
511
  */
423
512
  declare function getEnabledOAuthProviders(): SocialProvider[];
424
513
  /**
@@ -531,7 +620,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
531
620
  id: number;
532
621
  name: string;
533
622
  displayName: string;
534
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
623
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
535
624
  }[];
536
625
  userId: number;
537
626
  publicId: string;
@@ -556,7 +645,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
556
645
  }, {}, Response>;
557
646
  oauthStart: _spfn_core_route.RouteDef<{
558
647
  body: _sinclair_typebox.TObject<{
559
- provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver">[]>;
648
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
560
649
  returnUrl: _sinclair_typebox.TString;
561
650
  publicKey: _sinclair_typebox.TString;
562
651
  keyId: _sinclair_typebox.TString;
@@ -566,7 +655,7 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
566
655
  }>;
567
656
  }, {}, OAuthStartResult>;
568
657
  oauthProviders: _spfn_core_route.RouteDef<{}, {}, {
569
- providers: ("google" | "github" | "kakao" | "naver")[];
658
+ providers: ("google" | "github" | "kakao" | "naver" | "superself")[];
570
659
  }>;
571
660
  getGoogleOAuthUrl: _spfn_core_route.RouteDef<{
572
661
  body: _sinclair_typebox.TObject<{
@@ -588,6 +677,36 @@ declare const mainAuthRouter: _spfn_core_route.Router<{
588
677
  keyId: string;
589
678
  returnUrl: string;
590
679
  }>;
680
+ oauthProviderStart: _spfn_core_route.RouteDef<{
681
+ params: _sinclair_typebox.TObject<{
682
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
683
+ }>;
684
+ query: _sinclair_typebox.TObject<{
685
+ state: _sinclair_typebox.TString;
686
+ }>;
687
+ }, {}, Response>;
688
+ oauthProviderCallback: _spfn_core_route.RouteDef<{
689
+ params: _sinclair_typebox.TObject<{
690
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
691
+ }>;
692
+ query: _sinclair_typebox.TObject<{
693
+ code: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
694
+ state: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
695
+ error: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
696
+ error_description: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
697
+ }>;
698
+ }, {}, Response>;
699
+ getProviderOAuthUrl: _spfn_core_route.RouteDef<{
700
+ params: _sinclair_typebox.TObject<{
701
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
702
+ }>;
703
+ body: _sinclair_typebox.TObject<{
704
+ returnUrl: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
705
+ state: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
706
+ }>;
707
+ }, {}, {
708
+ authUrl: string;
709
+ }>;
591
710
  getInvitation: _spfn_core_route.RouteDef<{
592
711
  params: _sinclair_typebox.TObject<{
593
712
  token: _sinclair_typebox.TString;
@@ -896,4 +1015,4 @@ declare const authenticate: _spfn_core_route.NamedMiddleware<"auth">;
896
1015
  */
897
1016
  declare const optionalAuth: _spfn_core_route.NamedMiddleware<"optionalAuth">;
898
1017
 
899
- export { authenticate as $, type AuthSession as A, registerPublicKeyService as B, type CheckAccountExistsResult as C, rotateKeyService as D, revokeKeyService as E, type RegisterPublicKeyParams as F, type RotateKeyParams as G, type RevokeKeyParams as H, type IssueOneTimeTokenResult as I, issueOneTimeTokenService as J, verifyOneTimeTokenService as K, type LoginResult as L, oauthStartService as M, oauthCallbackService as N, type OAuthStartResult as O, type PermissionConfig as P, buildOAuthErrorUrl as Q, type RoleConfig as R, type SendVerificationCodeResult as S, isOAuthProviderEnabled as T, type UserProfile as U, type VerificationTargetType as V, getEnabledOAuthProviders as W, getGoogleAccessToken as X, type OAuthStartParams as Y, type OAuthCallbackParams as Z, type OAuthCallbackResult as _, type RegisterResult as a, optionalAuth as a0, EmailSchema as a1, PhoneSchema as a2, PasswordSchema as a3, TargetTypeSchema as a4, VerificationPurposeSchema as a5, type RotateKeyResult as b, type ProfileInfo as c, type VerificationPurpose as d, VERIFICATION_TARGET_TYPES as e, VERIFICATION_PURPOSES as f, PERMISSION_CATEGORIES as g, type PermissionCategory as h, type AuthInitOptions as i, type AuthContext as j, checkAccountExistsService as k, loginService as l, mainAuthRouter as m, logoutService as n, changePasswordService as o, type CheckAccountExistsParams as p, type RegisterParams as q, registerService as r, type LoginParams as s, type LogoutParams as t, type ChangePasswordParams as u, sendVerificationCodeService as v, verifyCodeService as w, type SendVerificationCodeParams as x, type VerifyCodeParams as y, type VerifyCodeResult as z };
1018
+ export { type OAuthCallbackParams as $, type AuthSession as A, type VerifyCodeResult as B, type CheckAccountExistsResult as C, registerPublicKeyService as D, rotateKeyService as E, revokeKeyService as F, type RegisterPublicKeyParams as G, type RotateKeyParams as H, type IssueOneTimeTokenResult as I, type RevokeKeyParams as J, issueOneTimeTokenService as K, type LoginResult as L, verifyOneTimeTokenService as M, oauthStartService as N, type OAuthStartResult as O, type PermissionConfig as P, oauthCallbackService as Q, type RoleConfig as R, type SendVerificationCodeResult as S, buildOAuthErrorUrl as T, type UserProfile as U, type VerificationTargetType as V, isOAuthProviderEnabled as W, requireEnabledProvider as X, getEnabledOAuthProviders as Y, getGoogleAccessToken as Z, type OAuthStartParams as _, type RegisterResult as a, type OAuthCallbackResult as a0, authenticate as a1, optionalAuth as a2, EmailSchema as a3, PhoneSchema as a4, PasswordSchema as a5, TargetTypeSchema as a6, VerificationPurposeSchema as a7, type NormalizedIdentity as a8, type OAuthTokens as a9, registerOAuthProvider as aa, getOAuthProvider as ab, getRegisteredProviders as ac, type RotateKeyResult as b, type ProfileInfo as c, type VerificationPurpose as d, VERIFICATION_TARGET_TYPES as e, VERIFICATION_PURPOSES as f, PERMISSION_CATEGORIES as g, type PermissionCategory as h, type AuthInitOptions as i, type OAuthProvider as j, type AuthContext as k, checkAccountExistsService as l, mainAuthRouter as m, loginService as n, logoutService as o, changePasswordService as p, type CheckAccountExistsParams as q, registerService as r, type RegisterParams as s, type LoginParams as t, type LogoutParams as u, type ChangePasswordParams as v, sendVerificationCodeService as w, verifyCodeService as x, type SendVerificationCodeParams as y, type VerifyCodeParams as z };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as _spfn_core_nextjs from '@spfn/core/nextjs';
2
- import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-B_HkYBzq.js';
3
- export { i as AuthInitOptions, A as AuthSession, g as PERMISSION_CATEGORIES, h as PermissionCategory, f as VERIFICATION_PURPOSES, e as VERIFICATION_TARGET_TYPES, d as VerificationPurpose, V as VerificationTargetType } from './authenticate-B_HkYBzq.js';
2
+ import { R as RoleConfig, P as PermissionConfig, C as CheckAccountExistsResult, S as SendVerificationCodeResult, a as RegisterResult, L as LoginResult, b as RotateKeyResult, I as IssueOneTimeTokenResult, O as OAuthStartResult, U as UserProfile, c as ProfileInfo, m as mainAuthRouter } from './authenticate-mfVRzeIK.js';
3
+ export { i as AuthInitOptions, A as AuthSession, g as PERMISSION_CATEGORIES, h as PermissionCategory, f as VERIFICATION_PURPOSES, e as VERIFICATION_TARGET_TYPES, d as VerificationPurpose, V as VerificationTargetType } from './authenticate-mfVRzeIK.js';
4
4
  import * as _spfn_core_route from '@spfn/core/route';
5
5
  import { HttpMethod } from '@spfn/core/route';
6
- export { I as INVITATION_STATUSES, b as InvitationStatus, a as KEY_ALGORITHM, K as KeyAlgorithmType, S as SOCIAL_PROVIDERS, d as SocialProvider, U as USER_STATUSES, c as UserStatus } from './types-B1CzVZkU.js';
6
+ export { I as INVITATION_STATUSES, b as InvitationStatus, a as KEY_ALGORITHM, K as KeyAlgorithmType, S as SOCIAL_PROVIDERS, d as SocialProvider, U as USER_STATUSES, c as UserStatus } from './types-B4auHIax.js';
7
7
  import * as _sinclair_typebox from '@sinclair/typebox';
8
8
  import '@spfn/auth/server';
9
9
 
@@ -170,7 +170,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
170
170
  id: number;
171
171
  name: string;
172
172
  displayName: string;
173
- category: "auth" | "custom" | "user" | "rbac" | "system" | undefined;
173
+ category: "custom" | "user" | "auth" | "rbac" | "system" | undefined;
174
174
  }[];
175
175
  userId: number;
176
176
  publicId: string;
@@ -195,7 +195,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
195
195
  }, {}, Response>;
196
196
  oauthStart: _spfn_core_route.RouteDef<{
197
197
  body: _sinclair_typebox.TObject<{
198
- provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver">[]>;
198
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
199
199
  returnUrl: _sinclair_typebox.TString;
200
200
  publicKey: _sinclair_typebox.TString;
201
201
  keyId: _sinclair_typebox.TString;
@@ -205,7 +205,7 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
205
205
  }>;
206
206
  }, {}, OAuthStartResult>;
207
207
  oauthProviders: _spfn_core_route.RouteDef<{}, {}, {
208
- providers: ("google" | "github" | "kakao" | "naver")[];
208
+ providers: ("google" | "github" | "kakao" | "naver" | "superself")[];
209
209
  }>;
210
210
  getGoogleOAuthUrl: _spfn_core_route.RouteDef<{
211
211
  body: _sinclair_typebox.TObject<{
@@ -227,6 +227,36 @@ declare const authApi: _spfn_core_nextjs.Client<_spfn_core_route.Router<{
227
227
  keyId: string;
228
228
  returnUrl: string;
229
229
  }>;
230
+ oauthProviderStart: _spfn_core_route.RouteDef<{
231
+ params: _sinclair_typebox.TObject<{
232
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
233
+ }>;
234
+ query: _sinclair_typebox.TObject<{
235
+ state: _sinclair_typebox.TString;
236
+ }>;
237
+ }, {}, Response>;
238
+ oauthProviderCallback: _spfn_core_route.RouteDef<{
239
+ params: _sinclair_typebox.TObject<{
240
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
241
+ }>;
242
+ query: _sinclair_typebox.TObject<{
243
+ code: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
244
+ state: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
245
+ error: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
246
+ error_description: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
247
+ }>;
248
+ }, {}, Response>;
249
+ getProviderOAuthUrl: _spfn_core_route.RouteDef<{
250
+ params: _sinclair_typebox.TObject<{
251
+ provider: _sinclair_typebox.TUnion<_sinclair_typebox.TLiteral<"google" | "github" | "kakao" | "naver" | "superself">[]>;
252
+ }>;
253
+ body: _sinclair_typebox.TObject<{
254
+ returnUrl: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
255
+ state: _sinclair_typebox.TOptional<_sinclair_typebox.TString>;
256
+ }>;
257
+ }, {}, {
258
+ authUrl: string;
259
+ }>;
230
260
  getInvitation: _spfn_core_route.RouteDef<{
231
261
  params: _sinclair_typebox.TObject<{
232
262
  token: _sinclair_typebox.TString;
package/dist/index.js CHANGED
@@ -191,6 +191,9 @@ var routeMap = {
191
191
  oauthProviders: { method: "GET", path: "/_auth/oauth/providers" },
192
192
  getGoogleOAuthUrl: { method: "POST", path: "/_auth/oauth/google/url" },
193
193
  oauthFinalize: { method: "POST", path: "/_auth/oauth/finalize" },
194
+ oauthProviderStart: { method: "GET", path: "/_auth/oauth/:provider" },
195
+ oauthProviderCallback: { method: "GET", path: "/_auth/oauth/:provider/callback" },
196
+ getProviderOAuthUrl: { method: "POST", path: "/_auth/oauth/:provider/url" },
194
197
  listRoles: { method: "GET", path: "/_auth/admin/roles" },
195
198
  createAdminRole: { method: "POST", path: "/_auth/admin/roles" },
196
199
  updateAdminRole: { method: "PATCH", path: "/_auth/admin/roles/:id" },
@@ -333,7 +336,7 @@ var BUILTIN_ROLE_PERMISSIONS = {
333
336
  var KEY_ALGORITHM = ["ES256", "RS256"];
334
337
  var INVITATION_STATUSES = ["pending", "accepted", "expired", "cancelled"];
335
338
  var USER_STATUSES = ["active", "inactive", "suspended"];
336
- var SOCIAL_PROVIDERS = ["google", "github", "kakao", "naver"];
339
+ var SOCIAL_PROVIDERS = ["google", "github", "kakao", "naver", "superself"];
337
340
 
338
341
  // ../../node_modules/.pnpm/@sinclair+typebox@0.34.41/node_modules/@sinclair/typebox/build/esm/type/guard/value.mjs
339
342
  var value_exports = {};