@spfn/auth 0.2.0-beta.87 → 0.2.0-beta.89

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/README.md +384 -18
  2. package/dist/{authenticate-C7w-pLOR.d.ts → authenticate-DK-hLSOW.d.ts} +154 -5
  3. package/dist/client-proof.d.ts +122 -2
  4. package/dist/client-proof.js +366 -5
  5. package/dist/client-proof.js.map +1 -1
  6. package/dist/config.d.ts +36 -0
  7. package/dist/config.js +18 -0
  8. package/dist/config.js.map +1 -1
  9. package/dist/errors.d.ts +93 -2
  10. package/dist/errors.js +57 -0
  11. package/dist/errors.js.map +1 -1
  12. package/dist/index.d.ts +32 -3
  13. package/dist/index.js +60 -0
  14. package/dist/index.js.map +1 -1
  15. package/dist/nextjs/server.d.ts +2 -2
  16. package/dist/server.d.ts +126 -11
  17. package/dist/server.js +527 -106
  18. package/dist/server.js.map +1 -1
  19. package/dist/{session-CGxgH3C9.d.ts → session-CFK4BT25.d.ts} +1 -1
  20. package/dist/{types-1BMx0OX1.d.ts → types-CD95yudz.d.ts} +15 -1
  21. package/migrations/20251125021229_premium_famine/snapshot.json +2641 -0
  22. package/migrations/20260225130050_smooth_the_fury/snapshot.json +2686 -0
  23. package/migrations/20260308141417_deep_iceman/snapshot.json +2686 -0
  24. package/migrations/20260308151309_perfect_deathbird/snapshot.json +2731 -0
  25. package/migrations/20260308201135_concerned_rawhide_kid/snapshot.json +2786 -0
  26. package/migrations/20260629103209_lethal_lifeguard/snapshot.json +2786 -0
  27. package/migrations/20260709073531_easy_hardball/snapshot.json +3119 -0
  28. package/migrations/20260714081434_glossy_major_mapleleaf/snapshot.json +3112 -0
  29. package/migrations/20260804105939_amazing_bushwacker/migration.sql +3 -0
  30. package/migrations/20260804105939_amazing_bushwacker/snapshot.json +3112 -0
  31. package/migrations/20260804110033_fat_piledriver/migration.sql +2 -0
  32. package/migrations/20260804110033_fat_piledriver/snapshot.json +3138 -0
  33. package/package.json +3 -6
  34. package/migrations/meta/0000_snapshot.json +0 -1632
  35. package/migrations/meta/0001_snapshot.json +0 -1660
  36. package/migrations/meta/0002_snapshot.json +0 -1660
  37. package/migrations/meta/0003_snapshot.json +0 -1689
  38. package/migrations/meta/0004_snapshot.json +0 -1721
  39. package/migrations/meta/0005_snapshot.json +0 -1721
  40. package/migrations/meta/0006_snapshot.json +0 -1921
  41. package/migrations/meta/0007_snapshot.json +0 -1916
  42. package/migrations/meta/_journal.json +0 -62
  43. /package/migrations/{0000_premium_famine.sql → 20251125021229_premium_famine/migration.sql} +0 -0
  44. /package/migrations/{0001_smooth_the_fury.sql → 20260225130050_smooth_the_fury/migration.sql} +0 -0
  45. /package/migrations/{0002_deep_iceman.sql → 20260308141417_deep_iceman/migration.sql} +0 -0
  46. /package/migrations/{0003_perfect_deathbird.sql → 20260308151309_perfect_deathbird/migration.sql} +0 -0
  47. /package/migrations/{0004_concerned_rawhide_kid.sql → 20260308201135_concerned_rawhide_kid/migration.sql} +0 -0
  48. /package/migrations/{0005_lethal_lifeguard.sql → 20260629103209_lethal_lifeguard/migration.sql} +0 -0
  49. /package/migrations/{0006_easy_hardball.sql → 20260709073531_easy_hardball/migration.sql} +0 -0
  50. /package/migrations/{0007_glossy_major_mapleleaf.sql → 20260714081434_glossy_major_mapleleaf/migration.sql} +0 -0
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { S as SessionData } from '../session-CGxgH3C9.js';
4
- import { K as KeyAlgorithmType } from '../types-1BMx0OX1.js';
3
+ import { S as SessionData } from '../session-CFK4BT25.js';
4
+ import { K as KeyAlgorithmType } from '../types-CD95yudz.js';
5
5
  import { NextRequest, NextResponse } from 'next/server';
6
6
 
7
7
  interface RequireAuthProps {
package/dist/server.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { j as AuthInitOptions, k as OAuthProvider, e as VerificationPurpose, i as PermissionCategory, l as AuthContext } from './authenticate-C7w-pLOR.js';
2
- export { a5 as AuthProfileVerifier, C as ChangePasswordParams, a8 as EmailSchema, I as IssueOneTimeTokenResult, s as LoginParams, L as LoginResult, t as LogoutParams, af as NativeVerifyOptions, ad as NormalizedIdentity, _ as OAuthCallbackParams, $ as OAuthCallbackResult, ag as OAuthCodeExchangeOptions, a2 as OAuthNativeParams, c as OAuthNativeResult, Z as OAuthStartParams, O as OAuthStartResult, ae as OAuthTokens, aa as PasswordSchema, a9 as PhoneSchema, q as RegisterParams, E as RegisterPublicKeyParams, a as RegisterResult, G as RevokeKeyParams, F as RotateKeyParams, b as RotateKeyResult, w as SendVerificationCodeParams, S as SendVerificationCodeResult, ab as TargetTypeSchema, ai as UnlinkNotification, aj as UnlinkNotifyRejection, ah as UnlinkNotifyRequest, a0 as UnlinkNotifyResult, g as VERIFICATION_PURPOSES, f as VERIFICATION_TARGET_TYPES, ac as VerificationPurposeSchema, V as VerificationTargetType, x as VerifyCodeParams, y as VerifyCodeResult, m as authRouter, a6 as authenticate, N as buildOAuthErrorUrl, p as changePasswordService, W as getEnabledOAuthProviders, X as getGoogleAccessToken, al as getOAuthProvider, am as getRegisteredProviders, Q as isOAuthProviderEnabled, H as issueOneTimeTokenService, n as loginService, o as logoutService, M as oauthCallbackService, a1 as oauthNativeService, K as oauthStartService, Y as oauthUnlinkNotifyService, a7 as optionalAuth, ak as registerOAuthProvider, z as registerPublicKeyService, r as registerService, T as requireEnabledProvider, a4 as resolveAuthenticatedUser, D as revokeKeyService, B as rotateKeyService, a3 as selectAuthProfile, u as sendVerificationCodeService, v as verifyCodeService, J as verifyOneTimeTokenService } from './authenticate-C7w-pLOR.js';
1
+ import { k as AuthInitOptions, l as OAuthProvider, f as VerificationPurpose, j as PermissionCategory, n as AuthContext } from './authenticate-DK-hLSOW.js';
2
+ export { ab as AuthProfileVerifier, C as ChangePasswordParams, ag as DeviceNameSchema, ae as EmailSchema, I as IssueOneTimeTokenResult, H as KEY_FINGERPRINT_PREFIX_LENGTH, K as KeySummary, t as LoginParams, L as LoginResult, u as LogoutParams, an as NativeVerifyOptions, al as NormalizedIdentity, a4 as OAuthCallbackParams, a5 as OAuthCallbackResult, ao as OAuthCodeExchangeOptions, a8 as OAuthNativeParams, d as OAuthNativeResult, a3 as OAuthStartParams, O as OAuthStartResult, am as OAuthTokens, ai as PasswordSchema, af as PhoneSchema, ah as PlatformSchema, s as RegisterParams, J as RegisterPublicKeyParams, a as RegisterResult, Q as RevokeAllKeysParams, c as RevokeAllKeysResult, N as RevokeKeyParams, M as RotateKeyParams, b as RotateKeyResult, x as SendVerificationCodeParams, S as SendVerificationCodeResult, aj as TargetTypeSchema, aq as UnlinkNotification, ar as UnlinkNotifyRejection, ap as UnlinkNotifyRequest, a6 as UnlinkNotifyResult, h as VERIFICATION_PURPOSES, g as VERIFICATION_TARGET_TYPES, ak as VerificationPurposeSchema, V as VerificationTargetType, y as VerifyCodeParams, z as VerifyCodeResult, m as authRouter, ac as authenticate, Z as buildOAuthErrorUrl, q as changePasswordService, a0 as getEnabledOAuthProviders, a1 as getGoogleAccessToken, at as getOAuthProvider, au as getRegisteredProviders, _ as isOAuthProviderEnabled, T as issueOneTimeTokenService, F as listKeysService, o as loginService, p as logoutService, Y as oauthCallbackService, a7 as oauthNativeService, X as oauthStartService, a2 as oauthUnlinkNotifyService, ad as optionalAuth, as as registerOAuthProvider, B as registerPublicKeyService, r as registerService, $ as requireEnabledProvider, aa as resolveAuthenticatedUser, G as revokeAllKeysService, E as revokeKeyService, D as rotateKeyService, a9 as selectAuthProfile, v as sendVerificationCodeService, w as verifyCodeService, W as verifyOneTimeTokenService } from './authenticate-DK-hLSOW.js';
3
3
  import * as drizzle_orm_pg_core from 'drizzle-orm/pg-core';
4
- import { K as KeyAlgorithmType, c as InvitationStatus, e as SocialProvider, g as AccountDeletionRequestedBy, h as PurgeStrategy } from './types-1BMx0OX1.js';
5
- export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, f as AccountDeletionRequestStatus, I as INVITATION_STATUSES, a as KEY_ALGORITHM, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, d as UserStatus } from './types-1BMx0OX1.js';
4
+ import { K as KeyAlgorithmType, f as InvitationStatus, h as SocialProvider, j as AccountDeletionRequestedBy, k as PurgeStrategy } from './types-CD95yudz.js';
5
+ export { b as ACCOUNT_DELETION_REQUESTED_BY, A as ACCOUNT_DELETION_REQUEST_STATUSES, i as AccountDeletionRequestStatus, I as INVITATION_STATUSES, a as KEY_ALGORITHM, e as KEY_DEVICE_NAME_MAX_LENGTH, c as KEY_PLATFORM, d as KeyPlatformType, P as PURGE_STRATEGIES, S as SOCIAL_PROVIDERS, U as USER_STATUSES, g as UserStatus } from './types-CD95yudz.js';
6
6
  import { UserProfile as UserProfile$1, ProfileInfo } from '@spfn/auth';
7
7
  import { BaseRepository } from '@spfn/core/db';
8
8
  import { Context } from 'hono';
9
9
  import * as _spfn_core_route from '@spfn/core/route';
10
10
  import { Algorithm } from 'jsonwebtoken';
11
- export { S as SessionData, g as getSessionInfo, s as sealSession, a as shouldRefreshSession, u as unsealSession } from './session-CGxgH3C9.js';
11
+ export { S as SessionData, g as getSessionInfo, s as sealSession, a as shouldRefreshSession, u as unsealSession } from './session-CFK4BT25.js';
12
12
  import { JWTPayload } from 'jose';
13
13
  import { SSETokenStore, SSETokenManager } from '@spfn/core/event/sse';
14
14
  import * as _spfn_core_logger from '@spfn/core/logger';
@@ -1526,7 +1526,7 @@ declare function verifyOAuthState(encryptedState: string): Promise<OAuthState>;
1526
1526
  *
1527
1527
  * 네이티브/웹 SDK가 받은 id_token을 provider의 공개키(JWKS)로 검증한다.
1528
1528
  * authorization code 교환이 없으므로 client secret을 쓰지 않는다.
1529
- * 서명·issuer·audience·만료는 jose가, nonce는 여기서 직접 대조한다.
1529
+ * 서명·issuer·audience·만료·발급 후 경과 시간은 jose가, nonce는 여기서 직접 대조한다.
1530
1530
  */
1531
1531
 
1532
1532
  interface VerifyIdTokenParams {
@@ -1542,7 +1542,7 @@ interface VerifyIdTokenParams {
1542
1542
  /**
1543
1543
  * id_token을 검증하고 claims(payload)를 반환한다.
1544
1544
  *
1545
- * @throws InvalidSocialTokenError 서명/issuer/audience/만료/알고리즘/nonce/sub 검증 실패 시
1545
+ * @throws InvalidSocialTokenError 서명/issuer/audience/만료/토큰 나이/알고리즘/nonce/sub 검증 실패 시
1546
1546
  */
1547
1547
  declare function verifyIdToken(params: VerifyIdTokenParams): Promise<JWTPayload>;
1548
1548
 
@@ -1617,13 +1617,13 @@ declare const appleProvider: OAuthProvider;
1617
1617
  declare const githubProvider: OAuthProvider;
1618
1618
 
1619
1619
  /**
1620
- * Kakao Login OAuthProvider (web authorization-code flow).
1620
+ * Kakao Login OAuthProvider (web authorization-code flow + native id_token verification).
1621
1621
  */
1622
1622
 
1623
1623
  declare const kakaoProvider: OAuthProvider;
1624
1624
 
1625
1625
  /**
1626
- * Naver Login OAuthProvider (web authorization-code flow).
1626
+ * Naver Login OAuthProvider (web authorization-code flow + native id_token verification).
1627
1627
  */
1628
1628
 
1629
1629
  declare const naverProvider: OAuthProvider;
@@ -2341,6 +2341,36 @@ declare const userPublicKeys: drizzle_orm_pg_core.PgTableWithColumns<{
2341
2341
  identity: undefined;
2342
2342
  generated: undefined;
2343
2343
  }>;
2344
+ deviceName: drizzle_orm_pg_core.PgBuildColumn<"user_public_keys", drizzle_orm_pg_core.PgTextBuilder<[string, ...string[]]>, {
2345
+ name: string;
2346
+ tableName: "user_public_keys";
2347
+ dataType: "string";
2348
+ data: string;
2349
+ driverParam: string;
2350
+ notNull: false;
2351
+ hasDefault: false;
2352
+ isPrimaryKey: false;
2353
+ isAutoincrement: false;
2354
+ hasRuntimeDefault: false;
2355
+ enumValues: undefined;
2356
+ identity: undefined;
2357
+ generated: undefined;
2358
+ }>;
2359
+ platform: drizzle_orm_pg_core.PgBuildColumn<"user_public_keys", drizzle_orm_pg_core.PgTextBuilder<["ios", "android", "web", "desktop"] & [string, ...string[]]>, {
2360
+ name: string;
2361
+ tableName: "user_public_keys";
2362
+ dataType: "string enum";
2363
+ data: "ios" | "android" | "web" | "desktop";
2364
+ driverParam: string;
2365
+ notNull: false;
2366
+ hasDefault: false;
2367
+ isPrimaryKey: false;
2368
+ isAutoincrement: false;
2369
+ hasRuntimeDefault: false;
2370
+ enumValues: ["ios", "android", "web", "desktop"] & [string, ...string[]];
2371
+ identity: undefined;
2372
+ generated: undefined;
2373
+ }>;
2344
2374
  isActive: drizzle_orm_pg_core.PgBuildColumn<"user_public_keys", drizzle_orm_pg_core.SetHasDefault<drizzle_orm_pg_core.SetNotNull<drizzle_orm_pg_core.PgBooleanBuilder>>, {
2345
2375
  name: string;
2346
2376
  tableName: "user_public_keys";
@@ -3681,6 +3711,8 @@ declare class KeysRepository extends BaseRepository {
3681
3711
  publicKey: string;
3682
3712
  algorithm: "ES256" | "RS256";
3683
3713
  fingerprint: string;
3714
+ deviceName: string | null;
3715
+ platform: "ios" | "android" | "web" | "desktop" | null;
3684
3716
  isActive: boolean;
3685
3717
  createdAt: Date;
3686
3718
  lastUsedAt: Date | null;
@@ -3699,6 +3731,8 @@ declare class KeysRepository extends BaseRepository {
3699
3731
  publicKey: string;
3700
3732
  algorithm: "ES256" | "RS256";
3701
3733
  fingerprint: string;
3734
+ deviceName: string | null;
3735
+ platform: "ios" | "android" | "web" | "desktop" | null;
3702
3736
  isActive: boolean;
3703
3737
  createdAt: Date;
3704
3738
  lastUsedAt: Date | null;
@@ -3717,6 +3751,8 @@ declare class KeysRepository extends BaseRepository {
3717
3751
  publicKey: string;
3718
3752
  algorithm: "ES256" | "RS256";
3719
3753
  fingerprint: string;
3754
+ deviceName: string | null;
3755
+ platform: "ios" | "android" | "web" | "desktop" | null;
3720
3756
  isActive: boolean;
3721
3757
  createdAt: Date;
3722
3758
  lastUsedAt: Date | null;
@@ -3724,6 +3760,28 @@ declare class KeysRepository extends BaseRepository {
3724
3760
  revokedAt: Date | null;
3725
3761
  revokedReason: string | null;
3726
3762
  }[]>;
3763
+ /**
3764
+ * 키 목록 화면이 쓰는 공개키 조회 — 최근 등록순
3765
+ *
3766
+ * publicKey 원문은 고르지 않는다. 목록의 용도는 기기를 알아보고 지목하는 것이고,
3767
+ * 공개키는 그 어느 쪽에도 필요 없다. fingerprint는 호출자가 잘라서 내보낸다.
3768
+ *
3769
+ * `includeRevoked`는 이미 끊은 기기까지 보여준다 — "내가 언제 무엇을 끊었나"를
3770
+ * 확인하는 용도라, 폐기 시각과 사유를 함께 고른다.
3771
+ * Read replica 사용
3772
+ */
3773
+ listForUser(userId: number, includeRevoked?: boolean): Promise<{
3774
+ keyId: string;
3775
+ deviceName: string | null;
3776
+ platform: "ios" | "android" | "web" | "desktop" | null;
3777
+ algorithm: "ES256" | "RS256";
3778
+ fingerprint: string;
3779
+ isActive: boolean;
3780
+ createdAt: Date;
3781
+ lastUsedAt: Date | null;
3782
+ expiresAt: Date | null;
3783
+ revokedAt: Date | null;
3784
+ }[]>;
3727
3785
  /**
3728
3786
  * 공개키 생성
3729
3787
  * Write primary 사용
@@ -3733,6 +3791,8 @@ declare class KeysRepository extends BaseRepository {
3733
3791
  keyId: string;
3734
3792
  fingerprint: string;
3735
3793
  algorithm: "ES256" | "RS256";
3794
+ deviceName: string | null;
3795
+ platform: "ios" | "android" | "web" | "desktop" | null;
3736
3796
  userId: number;
3737
3797
  id: number;
3738
3798
  isActive: boolean;
@@ -3753,6 +3813,8 @@ declare class KeysRepository extends BaseRepository {
3753
3813
  publicKey: string;
3754
3814
  algorithm: "ES256" | "RS256";
3755
3815
  fingerprint: string;
3816
+ deviceName: string | null;
3817
+ platform: "ios" | "android" | "web" | "desktop" | null;
3756
3818
  isActive: boolean;
3757
3819
  createdAt: Date;
3758
3820
  lastUsedAt: Date | null;
@@ -3774,6 +3836,31 @@ declare class KeysRepository extends BaseRepository {
3774
3836
  publicKey: string;
3775
3837
  algorithm: "ES256" | "RS256";
3776
3838
  fingerprint: string;
3839
+ deviceName: string | null;
3840
+ platform: "ios" | "android" | "web" | "desktop" | null;
3841
+ isActive: boolean;
3842
+ createdAt: Date;
3843
+ lastUsedAt: Date | null;
3844
+ expiresAt: Date | null;
3845
+ revokedAt: Date | null;
3846
+ revokedReason: string | null;
3847
+ }[]>;
3848
+ /**
3849
+ * 지정한 키 하나만 남기고 사용자의 활성 공개키를 전부 revoke
3850
+ *
3851
+ * "다른 기기 전부 로그아웃" — 요청을 보낸 기기는 살려 둔다. 남길 키를 별도 조회로
3852
+ * 확인하지 않고 조건에 담아, 그 사이에 다른 요청이 키를 바꾸는 경쟁을 만들지 않는다.
3853
+ * Write primary 사용
3854
+ */
3855
+ revokeAllActiveByUserIdExcept(userId: number, keepKeyId: string, reason: string): Promise<{
3856
+ id: number;
3857
+ userId: number;
3858
+ keyId: string;
3859
+ publicKey: string;
3860
+ algorithm: "ES256" | "RS256";
3861
+ fingerprint: string;
3862
+ deviceName: string | null;
3863
+ platform: "ios" | "android" | "web" | "desktop" | null;
3777
3864
  isActive: boolean;
3778
3865
  createdAt: Date;
3779
3866
  lastUsedAt: Date | null;
@@ -3790,6 +3877,8 @@ declare class KeysRepository extends BaseRepository {
3790
3877
  keyId: string;
3791
3878
  fingerprint: string;
3792
3879
  algorithm: "ES256" | "RS256";
3880
+ deviceName: string | null;
3881
+ platform: "ios" | "android" | "web" | "desktop" | null;
3793
3882
  userId: number;
3794
3883
  id: number;
3795
3884
  isActive: boolean;
@@ -3818,6 +3907,28 @@ declare class KeysRepository extends BaseRepository {
3818
3907
  publicKey: string;
3819
3908
  algorithm: "ES256" | "RS256";
3820
3909
  fingerprint: string;
3910
+ deviceName: string | null;
3911
+ platform: "ios" | "android" | "web" | "desktop" | null;
3912
+ isActive: boolean;
3913
+ createdAt: Date;
3914
+ lastUsedAt: Date | null;
3915
+ expiresAt: Date | null;
3916
+ revokedAt: Date | null;
3917
+ revokedReason: string | null;
3918
+ }>;
3919
+ /**
3920
+ * 만료 시각 연장 — 같은 사용자가 로그인으로 신원을 다시 증명했을 때 쓴다.
3921
+ * Write primary 사용
3922
+ */
3923
+ extendExpiry(keyId: string, userId: number, expiresAt: Date): Promise<{
3924
+ id: number;
3925
+ userId: number;
3926
+ keyId: string;
3927
+ publicKey: string;
3928
+ algorithm: "ES256" | "RS256";
3929
+ fingerprint: string;
3930
+ deviceName: string | null;
3931
+ platform: "ios" | "android" | "web" | "desktop" | null;
3821
3932
  isActive: boolean;
3822
3933
  createdAt: Date;
3823
3934
  lastUsedAt: Date | null;
@@ -3839,6 +3950,8 @@ declare class KeysRepository extends BaseRepository {
3839
3950
  publicKey: string;
3840
3951
  algorithm: "ES256" | "RS256";
3841
3952
  fingerprint: string;
3953
+ deviceName: string | null;
3954
+ platform: "ios" | "android" | "web" | "desktop" | null;
3842
3955
  isActive: boolean;
3843
3956
  createdAt: Date;
3844
3957
  lastUsedAt: Date | null;
@@ -3857,6 +3970,8 @@ declare class KeysRepository extends BaseRepository {
3857
3970
  publicKey: string;
3858
3971
  algorithm: "ES256" | "RS256";
3859
3972
  fingerprint: string;
3973
+ deviceName: string | null;
3974
+ platform: "ios" | "android" | "web" | "desktop" | null;
3860
3975
  isActive: boolean;
3861
3976
  createdAt: Date;
3862
3977
  lastUsedAt: Date | null;
@@ -4991,9 +5106,9 @@ declare class SocialAccountsRepository extends BaseRepository {
4991
5106
  createdAt: Date;
4992
5107
  updatedAt: Date;
4993
5108
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5109
+ accessToken: string | null;
4994
5110
  providerUserId: string;
4995
5111
  providerEmail: string | null;
4996
- accessToken: string | null;
4997
5112
  refreshToken: string | null;
4998
5113
  tokenExpiresAt: Date | null;
4999
5114
  }>;
@@ -5007,9 +5122,9 @@ declare class SocialAccountsRepository extends BaseRepository {
5007
5122
  createdAt: Date;
5008
5123
  updatedAt: Date;
5009
5124
  provider: "google" | "apple" | "github" | "kakao" | "naver" | "superself";
5125
+ accessToken: string | null;
5010
5126
  providerUserId: string;
5011
5127
  providerEmail: string | null;
5012
- accessToken: string | null;
5013
5128
  refreshToken: string | null;
5014
5129
  tokenExpiresAt: Date | null;
5015
5130
  }>;