@robelest/convex-auth 0.0.2-preview.0 → 0.0.2-preview.2

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 (166) hide show
  1. package/dist/bin.cjs +17 -15
  2. package/dist/client/index.d.ts +84 -30
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +259 -59
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/component/_generated/component.d.ts +46 -120
  7. package/dist/component/_generated/component.d.ts.map +1 -1
  8. package/dist/component/index.d.ts +2 -4
  9. package/dist/component/index.d.ts.map +1 -1
  10. package/dist/component/index.js +2 -4
  11. package/dist/component/index.js.map +1 -1
  12. package/dist/component/public.d.ts +233 -167
  13. package/dist/component/public.d.ts.map +1 -1
  14. package/dist/component/public.js +328 -155
  15. package/dist/component/public.js.map +1 -1
  16. package/dist/component/schema.d.ts +127 -12
  17. package/dist/component/schema.d.ts.map +1 -1
  18. package/dist/component/schema.js +136 -10
  19. package/dist/component/schema.js.map +1 -1
  20. package/dist/providers/{Anonymous.d.ts → anonymous.d.ts} +8 -8
  21. package/dist/providers/{Anonymous.d.ts.map → anonymous.d.ts.map} +1 -1
  22. package/dist/providers/{Anonymous.js → anonymous.js} +9 -10
  23. package/dist/providers/anonymous.js.map +1 -0
  24. package/dist/providers/{ConvexCredentials.d.ts → credentials.d.ts} +11 -11
  25. package/dist/providers/credentials.d.ts.map +1 -0
  26. package/dist/providers/{ConvexCredentials.js → credentials.js} +8 -8
  27. package/dist/providers/credentials.js.map +1 -0
  28. package/dist/providers/{Email.d.ts → email.d.ts} +6 -6
  29. package/dist/providers/email.d.ts.map +1 -0
  30. package/dist/providers/{Email.js → email.js} +6 -6
  31. package/dist/providers/email.js.map +1 -0
  32. package/dist/providers/{Password.d.ts → password.d.ts} +10 -10
  33. package/dist/providers/{Password.d.ts.map → password.d.ts.map} +1 -1
  34. package/dist/providers/{Password.js → password.js} +19 -20
  35. package/dist/providers/password.js.map +1 -0
  36. package/dist/providers/{Phone.d.ts → phone.d.ts} +3 -3
  37. package/dist/providers/{Phone.d.ts.map → phone.d.ts.map} +1 -1
  38. package/dist/providers/{Phone.js → phone.js} +3 -3
  39. package/dist/providers/{Phone.js.map → phone.js.map} +1 -1
  40. package/dist/server/implementation/db.d.ts +5 -2
  41. package/dist/server/implementation/db.d.ts.map +1 -1
  42. package/dist/server/implementation/db.js +2 -1
  43. package/dist/server/implementation/db.js.map +1 -1
  44. package/dist/server/implementation/index.d.ts +285 -180
  45. package/dist/server/implementation/index.d.ts.map +1 -1
  46. package/dist/server/implementation/index.js +280 -173
  47. package/dist/server/implementation/index.js.map +1 -1
  48. package/dist/server/implementation/mutations/createAccountFromCredentials.d.ts.map +1 -1
  49. package/dist/server/implementation/mutations/createAccountFromCredentials.js +8 -18
  50. package/dist/server/implementation/mutations/createAccountFromCredentials.js.map +1 -1
  51. package/dist/server/implementation/mutations/createVerificationCode.d.ts.map +1 -1
  52. package/dist/server/implementation/mutations/createVerificationCode.js +16 -44
  53. package/dist/server/implementation/mutations/createVerificationCode.js.map +1 -1
  54. package/dist/server/implementation/mutations/invalidateSessions.d.ts.map +1 -1
  55. package/dist/server/implementation/mutations/invalidateSessions.js +4 -8
  56. package/dist/server/implementation/mutations/invalidateSessions.js.map +1 -1
  57. package/dist/server/implementation/mutations/modifyAccount.d.ts.map +1 -1
  58. package/dist/server/implementation/mutations/modifyAccount.js +8 -19
  59. package/dist/server/implementation/mutations/modifyAccount.js.map +1 -1
  60. package/dist/server/implementation/mutations/refreshSession.d.ts.map +1 -1
  61. package/dist/server/implementation/mutations/refreshSession.js +9 -23
  62. package/dist/server/implementation/mutations/refreshSession.js.map +1 -1
  63. package/dist/server/implementation/mutations/retrieveAccountWithCredentials.d.ts.map +1 -1
  64. package/dist/server/implementation/mutations/retrieveAccountWithCredentials.js +6 -12
  65. package/dist/server/implementation/mutations/retrieveAccountWithCredentials.js.map +1 -1
  66. package/dist/server/implementation/mutations/signIn.d.ts.map +1 -1
  67. package/dist/server/implementation/mutations/signIn.js +2 -1
  68. package/dist/server/implementation/mutations/signIn.js.map +1 -1
  69. package/dist/server/implementation/mutations/signOut.d.ts.map +1 -1
  70. package/dist/server/implementation/mutations/signOut.js +5 -6
  71. package/dist/server/implementation/mutations/signOut.js.map +1 -1
  72. package/dist/server/implementation/mutations/storeRef.d.ts +8 -0
  73. package/dist/server/implementation/mutations/storeRef.d.ts.map +1 -0
  74. package/dist/server/implementation/mutations/storeRef.js +8 -0
  75. package/dist/server/implementation/mutations/storeRef.js.map +1 -0
  76. package/dist/server/implementation/mutations/userOAuth.d.ts.map +1 -1
  77. package/dist/server/implementation/mutations/userOAuth.js +16 -53
  78. package/dist/server/implementation/mutations/userOAuth.js.map +1 -1
  79. package/dist/server/implementation/mutations/verifier.d.ts.map +1 -1
  80. package/dist/server/implementation/mutations/verifier.js +4 -8
  81. package/dist/server/implementation/mutations/verifier.js.map +1 -1
  82. package/dist/server/implementation/mutations/verifierSignature.d.ts.map +1 -1
  83. package/dist/server/implementation/mutations/verifierSignature.js +6 -10
  84. package/dist/server/implementation/mutations/verifierSignature.js.map +1 -1
  85. package/dist/server/implementation/mutations/verifyCodeAndSignIn.d.ts.map +1 -1
  86. package/dist/server/implementation/mutations/verifyCodeAndSignIn.js +7 -16
  87. package/dist/server/implementation/mutations/verifyCodeAndSignIn.js.map +1 -1
  88. package/dist/server/implementation/provider.d.ts +2 -1
  89. package/dist/server/implementation/provider.d.ts.map +1 -1
  90. package/dist/server/implementation/provider.js.map +1 -1
  91. package/dist/server/implementation/rateLimit.d.ts.map +1 -1
  92. package/dist/server/implementation/rateLimit.js +13 -39
  93. package/dist/server/implementation/rateLimit.js.map +1 -1
  94. package/dist/server/implementation/refreshTokens.d.ts +1 -8
  95. package/dist/server/implementation/refreshTokens.d.ts.map +1 -1
  96. package/dist/server/implementation/refreshTokens.js +14 -58
  97. package/dist/server/implementation/refreshTokens.js.map +1 -1
  98. package/dist/server/implementation/sessions.d.ts +2 -20
  99. package/dist/server/implementation/sessions.d.ts.map +1 -1
  100. package/dist/server/implementation/sessions.js +8 -35
  101. package/dist/server/implementation/sessions.js.map +1 -1
  102. package/dist/server/implementation/types.d.ts +11 -267
  103. package/dist/server/implementation/types.d.ts.map +1 -1
  104. package/dist/server/implementation/types.js +1 -181
  105. package/dist/server/implementation/types.js.map +1 -1
  106. package/dist/server/implementation/users.d.ts.map +1 -1
  107. package/dist/server/implementation/users.js +19 -67
  108. package/dist/server/implementation/users.js.map +1 -1
  109. package/dist/server/index.d.ts +18 -0
  110. package/dist/server/index.d.ts.map +1 -1
  111. package/dist/server/index.js +255 -0
  112. package/dist/server/index.js.map +1 -1
  113. package/dist/server/provider_utils.d.ts +1 -1
  114. package/dist/server/provider_utils.d.ts.map +1 -1
  115. package/dist/server/provider_utils.js +2 -2
  116. package/dist/server/provider_utils.js.map +1 -1
  117. package/dist/server/types.d.ts +91 -52
  118. package/dist/server/types.d.ts.map +1 -1
  119. package/package.json +3 -6
  120. package/src/cli/index.ts +20 -19
  121. package/src/client/index.ts +347 -110
  122. package/src/component/_generated/component.ts +55 -214
  123. package/src/component/index.ts +1 -11
  124. package/src/component/public.ts +366 -178
  125. package/src/component/schema.ts +150 -19
  126. package/src/providers/{Anonymous.ts → anonymous.ts} +10 -11
  127. package/src/providers/{ConvexCredentials.ts → credentials.ts} +11 -11
  128. package/src/providers/{Email.ts → email.ts} +5 -5
  129. package/src/providers/{Password.ts → password.ts} +22 -27
  130. package/src/providers/{Phone.ts → phone.ts} +2 -2
  131. package/src/server/implementation/db.ts +5 -2
  132. package/src/server/implementation/index.ts +368 -313
  133. package/src/server/implementation/mutations/createAccountFromCredentials.ts +11 -25
  134. package/src/server/implementation/mutations/createVerificationCode.ts +16 -47
  135. package/src/server/implementation/mutations/invalidateSessions.ts +4 -9
  136. package/src/server/implementation/mutations/modifyAccount.ts +8 -22
  137. package/src/server/implementation/mutations/refreshSession.ts +11 -24
  138. package/src/server/implementation/mutations/retrieveAccountWithCredentials.ts +9 -17
  139. package/src/server/implementation/mutations/signIn.ts +2 -1
  140. package/src/server/implementation/mutations/signOut.ts +5 -8
  141. package/src/server/implementation/mutations/storeRef.ts +7 -0
  142. package/src/server/implementation/mutations/userOAuth.ts +10 -50
  143. package/src/server/implementation/mutations/verifier.ts +4 -9
  144. package/src/server/implementation/mutations/verifierSignature.ts +6 -12
  145. package/src/server/implementation/mutations/verifyCodeAndSignIn.ts +7 -18
  146. package/src/server/implementation/provider.ts +2 -1
  147. package/src/server/implementation/rateLimit.ts +15 -41
  148. package/src/server/implementation/refreshTokens.ts +26 -76
  149. package/src/server/implementation/sessions.ts +8 -39
  150. package/src/server/implementation/types.ts +16 -191
  151. package/src/server/implementation/users.ts +19 -66
  152. package/src/server/index.ts +373 -0
  153. package/src/server/provider_utils.ts +2 -2
  154. package/src/server/types.ts +116 -51
  155. package/dist/providers/Anonymous.js.map +0 -1
  156. package/dist/providers/ConvexCredentials.d.ts.map +0 -1
  157. package/dist/providers/ConvexCredentials.js.map +0 -1
  158. package/dist/providers/Email.d.ts.map +0 -1
  159. package/dist/providers/Email.js.map +0 -1
  160. package/dist/providers/Password.js.map +0 -1
  161. package/providers/Anonymous/package.json +0 -6
  162. package/providers/ConvexCredentials/package.json +0 -6
  163. package/providers/Email/package.json +0 -6
  164. package/providers/Password/package.json +0 -6
  165. package/providers/Phone/package.json +0 -6
  166. package/server/package.json +0 -6
@@ -2,10 +2,10 @@ import { Provider as AuthjsProviderConfig, CredentialsConfig, EmailConfig as Aut
2
2
  import { Theme } from "@auth/core/types";
3
3
  import { AnyDataModel, FunctionReference, GenericActionCtx, GenericDataModel, GenericMutationCtx } from "convex/server";
4
4
  import { GenericId, Value } from "convex/values";
5
- import { ConvexCredentialsUserConfig } from "../providers/ConvexCredentials.js";
5
+ import { CredentialsUserConfig } from "../providers/credentials.js";
6
6
  import { GenericDoc } from "./convex_types.js";
7
7
  /**
8
- * The config for the Convex Auth library, passed to `convexAuth`.
8
+ * The config for the Convex Auth library, passed to `Auth`.
9
9
  */
10
10
  export type ConvexAuthConfig = {
11
11
  /**
@@ -17,12 +17,12 @@ export type ConvexAuthConfig = {
17
17
  */
18
18
  providers: AuthProviderConfig[];
19
19
  /**
20
- * Optional auth component reference from `components.auth`.
20
+ * Auth component reference from `components.auth`.
21
21
  *
22
- * When provided, core auth storage operations are executed through
23
- * the component API boundary instead of direct table access.
22
+ * Core auth storage operations are executed through
23
+ * the component API boundary.
24
24
  */
25
- component?: AuthComponentApi;
25
+ component: AuthComponentApi;
26
26
  /**
27
27
  * Theme used for emails.
28
28
  * See [Auth.js theme docs](https://authjs.dev/reference/core/types#theme).
@@ -76,9 +76,9 @@ export type ConvexAuthConfig = {
76
76
  *
77
77
  * ```ts
78
78
  * import GitHub from "@auth/core/providers/github";
79
- * import { convexAuth } from "@robelest/convex-auth/component";
79
+ * import { Auth } from "@robelest/convex-auth/component";
80
80
  *
81
- * export const { auth, signIn, signOut, store } = convexAuth({
81
+ * export const { auth, signIn, signOut, store } = Auth({
82
82
  * providers: [GitHub],
83
83
  * callbacks: {
84
84
  * async redirect({ redirectTo }) {
@@ -301,21 +301,82 @@ export type PhoneUserConfig<DataModel extends GenericDataModel = GenericDataMode
301
301
  /**
302
302
  * Similar to Auth.js Credentials config.
303
303
  */
304
- export type ConvexCredentialsConfig = ConvexCredentialsUserConfig<any> & {
304
+ export type ConvexCredentialsConfig = CredentialsUserConfig<any> & {
305
305
  type: "credentials";
306
306
  id: string;
307
307
  };
308
+ export type AuthAccountCredentials = {
309
+ id: string;
310
+ secret?: string;
311
+ };
312
+ export type AuthCreateAccountArgs = {
313
+ provider: string;
314
+ account: AuthAccountCredentials;
315
+ profile: Record<string, unknown> & {
316
+ email?: string;
317
+ phone?: string;
318
+ emailVerified?: boolean;
319
+ phoneVerified?: boolean;
320
+ };
321
+ shouldLinkViaEmail?: boolean;
322
+ shouldLinkViaPhone?: boolean;
323
+ };
324
+ export type AuthRetrieveAccountArgs = {
325
+ provider: string;
326
+ account: AuthAccountCredentials;
327
+ };
328
+ export type AuthUpdateAccountCredentialsArgs = {
329
+ provider: string;
330
+ account: {
331
+ id: string;
332
+ secret: string;
333
+ };
334
+ };
335
+ export type AuthInvalidateSessionsArgs = {
336
+ userId: GenericId<"user">;
337
+ except?: GenericId<"session">[];
338
+ };
339
+ export type AuthProviderSignInArgs = {
340
+ accountId?: GenericId<"account">;
341
+ params?: Record<string, Value | undefined>;
342
+ };
343
+ export type AuthProviderSignInResult = {
344
+ userId: GenericId<"user">;
345
+ sessionId: GenericId<"session">;
346
+ } | null;
347
+ export type AuthServerHelpers = {
348
+ account: {
349
+ create: (ctx: GenericActionCtx<any>, args: AuthCreateAccountArgs) => Promise<{
350
+ account: GenericDoc<GenericDataModel, "account">;
351
+ user: GenericDoc<GenericDataModel, "user">;
352
+ }>;
353
+ get: (ctx: GenericActionCtx<any>, args: AuthRetrieveAccountArgs) => Promise<{
354
+ account: GenericDoc<GenericDataModel, "account">;
355
+ user: GenericDoc<GenericDataModel, "user">;
356
+ }>;
357
+ updateCredentials: (ctx: GenericActionCtx<any>, args: AuthUpdateAccountCredentialsArgs) => Promise<void>;
358
+ };
359
+ session: {
360
+ current: (ctx: {
361
+ auth: GenericActionCtx<GenericDataModel>["auth"];
362
+ }) => Promise<GenericId<"session"> | null>;
363
+ invalidate: (ctx: GenericActionCtx<any>, args: AuthInvalidateSessionsArgs) => Promise<void>;
364
+ };
365
+ provider: {
366
+ signIn: (ctx: GenericActionCtx<any>, provider: AuthProviderConfig, args: AuthProviderSignInArgs) => Promise<AuthProviderSignInResult>;
367
+ };
368
+ };
308
369
  /**
309
370
  * Your `ActionCtx` enriched with `ctx.auth.config` field with
310
- * the config passed to `convexAuth`.
371
+ * the config passed to `Auth`.
311
372
  */
312
373
  export type GenericActionCtxWithAuthConfig<DataModel extends GenericDataModel> = GenericActionCtx<DataModel> & {
313
- auth: {
374
+ auth: GenericActionCtx<DataModel>["auth"] & {
314
375
  config: ConvexAuthMaterializedConfig;
315
- };
376
+ } & AuthServerHelpers;
316
377
  };
317
378
  /**
318
- * The config for the Convex Auth library, passed to `convexAuth`,
379
+ * The config for the Convex Auth library, passed to `Auth`,
319
380
  * with defaults and initialized providers.
320
381
  *
321
382
  * See {@link ConvexAuthConfig}
@@ -357,10 +418,6 @@ export type AuthComponentApi = {
357
418
  verificationCodeGetByCode: FunctionReference<"query", "internal">;
358
419
  verificationCodeCreate: FunctionReference<"mutation", "internal">;
359
420
  verificationCodeDelete: FunctionReference<"mutation", "internal">;
360
- verificationGetByAccountId?: FunctionReference<"query", "internal">;
361
- verificationGetByCode?: FunctionReference<"query", "internal">;
362
- verificationCreate?: FunctionReference<"mutation", "internal">;
363
- verificationDelete?: FunctionReference<"mutation", "internal">;
364
421
  refreshTokenCreate: FunctionReference<"mutation", "internal">;
365
422
  refreshTokenGetById: FunctionReference<"query", "internal">;
366
423
  refreshTokenPatch: FunctionReference<"mutation", "internal">;
@@ -368,45 +425,27 @@ export type AuthComponentApi = {
368
425
  refreshTokenListBySession: FunctionReference<"query", "internal">;
369
426
  refreshTokenDeleteAll: FunctionReference<"mutation", "internal">;
370
427
  refreshTokenGetActive: FunctionReference<"query", "internal">;
371
- tokenCreate?: FunctionReference<"mutation", "internal">;
372
- tokenGetById?: FunctionReference<"query", "internal">;
373
- tokenPatch?: FunctionReference<"mutation", "internal">;
374
- tokenGetChildren?: FunctionReference<"query", "internal">;
375
- tokenListBySession?: FunctionReference<"query", "internal">;
376
- tokenDeleteAll?: FunctionReference<"mutation", "internal">;
377
- tokenGetActive?: FunctionReference<"query", "internal">;
378
428
  rateLimitGet: FunctionReference<"query", "internal">;
379
429
  rateLimitCreate: FunctionReference<"mutation", "internal">;
380
430
  rateLimitPatch: FunctionReference<"mutation", "internal">;
381
431
  rateLimitDelete: FunctionReference<"mutation", "internal">;
382
- limitGet?: FunctionReference<"query", "internal">;
383
- limitCreate?: FunctionReference<"mutation", "internal">;
384
- limitPatch?: FunctionReference<"mutation", "internal">;
385
- limitDelete?: FunctionReference<"mutation", "internal">;
386
- organizationCreate?: FunctionReference<"mutation", "internal">;
387
- organizationGet?: FunctionReference<"query", "internal">;
388
- organizationList?: FunctionReference<"query", "internal">;
389
- organizationUpdate?: FunctionReference<"mutation", "internal">;
390
- organizationDelete?: FunctionReference<"mutation", "internal">;
391
- teamCreate?: FunctionReference<"mutation", "internal">;
392
- teamGet?: FunctionReference<"query", "internal">;
393
- teamListByOrganization?: FunctionReference<"query", "internal">;
394
- teamUpdate?: FunctionReference<"mutation", "internal">;
395
- teamDelete?: FunctionReference<"mutation", "internal">;
396
- teamRelationCreate?: FunctionReference<"mutation", "internal">;
397
- teamRelationGet?: FunctionReference<"query", "internal">;
398
- teamRelationListByParent?: FunctionReference<"query", "internal">;
399
- teamRelationDelete?: FunctionReference<"mutation", "internal">;
400
- memberAdd?: FunctionReference<"mutation", "internal">;
401
- memberRemove?: FunctionReference<"mutation", "internal">;
402
- memberList?: FunctionReference<"query", "internal">;
403
- memberRoleSet?: FunctionReference<"mutation", "internal">;
404
- memberRoleGet?: FunctionReference<"query", "internal">;
405
- inviteCreate?: FunctionReference<"mutation", "internal">;
406
- inviteGet?: FunctionReference<"query", "internal">;
407
- inviteList?: FunctionReference<"query", "internal">;
408
- inviteAccept?: FunctionReference<"mutation", "internal">;
409
- inviteRevoke?: FunctionReference<"mutation", "internal">;
432
+ groupCreate: FunctionReference<"mutation", "internal">;
433
+ groupGet: FunctionReference<"query", "internal">;
434
+ groupList: FunctionReference<"query", "internal">;
435
+ groupUpdate: FunctionReference<"mutation", "internal">;
436
+ groupDelete: FunctionReference<"mutation", "internal">;
437
+ memberAdd: FunctionReference<"mutation", "internal">;
438
+ memberGet: FunctionReference<"query", "internal">;
439
+ memberList: FunctionReference<"query", "internal">;
440
+ memberListByUser: FunctionReference<"query", "internal">;
441
+ memberGetByGroupAndUser: FunctionReference<"query", "internal">;
442
+ memberRemove: FunctionReference<"mutation", "internal">;
443
+ memberUpdate: FunctionReference<"mutation", "internal">;
444
+ inviteCreate: FunctionReference<"mutation", "internal">;
445
+ inviteGet: FunctionReference<"query", "internal">;
446
+ inviteList: FunctionReference<"query", "internal">;
447
+ inviteAccept: FunctionReference<"mutation", "internal">;
448
+ inviteRevoke: FunctionReference<"mutation", "internal">;
410
449
  };
411
450
  };
412
451
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/server/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,IAAI,oBAAoB,EAChC,iBAAiB,EACjB,WAAW,IAAI,iBAAiB,EAChC,YAAY,EACZ,UAAU,EACX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,2BAA2B,EAAE,MAAM,mCAAmC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;;;;;OAMG;IACH,SAAS,EAAE,kBAAkB,EAAE,CAAC;IAChC;;;;;OAKG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;;;WAIG;QACH,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB;;;;WAIG;QACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF;;OAEG;IACH,GAAG,CAAC,EAAE;QACJ;;;;WAIG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF;;OAEG;IACH,MAAM,C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D,WAAW,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACvD,SAAS,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACrD,SAAS,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAClD,UAAU,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnD,gBAAgB,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACzD,uBAAuB,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAChE,YAAY,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACxD,YAAY,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACxD,YAAY,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACxD,SAAS,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QAClD,UAAU,EAAE,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;QACnD,YAAY,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACxD,YAAY,EAAE,iBAAiB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;KACzD,CAAC;CACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robelest/convex-auth",
3
- "version": "0.0.2-preview.0",
3
+ "version": "0.0.2-preview.2",
4
4
  "description": "Authentication for Convex",
5
5
  "keywords": [
6
6
  "authentication",
@@ -17,8 +17,6 @@
17
17
  "author": "xixixao",
18
18
  "files": [
19
19
  "dist",
20
- "providers",
21
- "server",
22
20
  "src"
23
21
  ],
24
22
  "type": "module",
@@ -35,9 +33,8 @@
35
33
  "spellcheck": "cspell \"docs/pages/**/*.md*\"",
36
34
  "prepare": "bun run build",
37
35
  "prepublishOnly": "bun run lint && bun run build && bun run test:once",
38
- "publish:example": "node publishExample.mjs",
39
- "test": "bun run --cwd ../../examples/vite test",
40
- "test:once": "bun run --cwd ../../examples/vite test:once",
36
+ "test": "bun run --cwd ../../packages/test test",
37
+ "test:once": "bun run --cwd ../../packages/test test:once",
41
38
  "convex:dev": "bunx convex dev",
42
39
  "convex:codegen": "bunx convex codegen && bun run convex:codegen:component",
43
40
  "convex:codegen:component": "bunx convex codegen --component-dir ./src/component",
package/src/cli/index.ts CHANGED
@@ -73,10 +73,9 @@ new Command()
73
73
  // Skipped if there's no tsconfig.json
74
74
  await modifyTsConfig(config);
75
75
 
76
- // Step 4: Configure auth.config.ts
77
- // To avoid having to execute it we just give instructions
78
- // if it exists already.
79
- await configureAuthConfig(config);
76
+ // Step 4: Configure convex.config.ts
77
+ // Ensure the auth component is registered via app.use(auth).
78
+ await configureConvexConfig(config);
80
79
 
81
80
  // Step 5: Initialize auth.ts
82
81
  // We do nothing if the file already contains the code,
@@ -395,36 +394,36 @@ function addCompilerOption(
395
394
  }
396
395
  }
397
396
 
398
- async function configureAuthConfig(config: ProjectConfig) {
399
- logStep(config, "Configure auth config file");
397
+ async function configureConvexConfig(config: ProjectConfig) {
398
+ logStep(config, "Configure convex config file");
400
399
  const sourceTemplate = `\
401
- export default {
402
- providers: [$$
403
- {
404
- domain: process.env.CONVEX_SITE_URL,
405
- applicationID: "convex",
406
- },$$
407
- ],
408
- };
400
+ import { defineApp } from "convex/server";
401
+ import auth from "@robelest/convex-auth/component/convex.config";
402
+
403
+ const app = defineApp();
404
+
405
+ app.use(auth);
406
+
407
+ export default app;
409
408
  `;
410
409
  const source = templateToSource(sourceTemplate);
411
- const authConfigPath = path.join(config.convexFolderPath, "auth.config");
412
- const existingConfigPath = await existingNonEmptySourcePath(authConfigPath);
410
+ const convexConfigPath = path.join(config.convexFolderPath, "convex.config");
411
+ const existingConfigPath = await existingNonEmptySourcePath(convexConfigPath);
413
412
  if (existingConfigPath !== null) {
414
413
  const existingConfig = readFileSync(existingConfigPath, "utf8");
415
414
  if (doesAlreadyMatchTemplate(existingConfig, sourceTemplate)) {
416
415
  logSuccess(`The ${chalk.bold(existingConfigPath)} is already set up.`);
417
416
  } else {
418
417
  logInfo(
419
- `You already have a ${chalk.bold(existingConfigPath)}, make sure the \`providers\` include the following config:`,
418
+ `You already have a ${chalk.bold(existingConfigPath)}, make sure it registers the auth component like this:`,
420
419
  );
421
420
  print(indent(`\n${source}\n`));
422
421
  await promptForConfirmationOrExit("Ready to continue?");
423
422
  }
424
423
  } else {
425
424
  const newConfigPath = config.usesTypeScript
426
- ? `${authConfigPath}.ts`
427
- : `${authConfigPath}.js`;
425
+ ? `${convexConfigPath}.ts`
426
+ : `${convexConfigPath}.js`;
428
427
  writeFileSync(newConfigPath, source);
429
428
  logSuccess(`Created ${chalk.bold(newConfigPath)}`);
430
429
  }
@@ -434,8 +433,10 @@ async function initializeAuth(config: ProjectConfig) {
434
433
  logStep(config, "Initialize auth file");
435
434
  const sourceTemplate = `\
436
435
  import { Auth } from "@robelest/convex-auth/component";
436
+ import { components } from "./_generated/api";
437
437
 
438
438
  export const { auth, signIn, signOut, store } = Auth({$$
439
+ component: components.auth,$$
439
440
  providers: [$$],$$
440
441
  });
441
442
  `;