@robelest/convex-auth 0.0.2-preview.1 → 0.0.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 (145) hide show
  1. package/dist/bin.cjs +466 -63
  2. package/dist/client/index.d.ts +211 -30
  3. package/dist/client/index.d.ts.map +1 -1
  4. package/dist/client/index.js +673 -59
  5. package/dist/client/index.js.map +1 -1
  6. package/dist/component/_generated/api.d.ts +56 -1
  7. package/dist/component/_generated/api.d.ts.map +1 -1
  8. package/dist/component/_generated/api.js.map +1 -1
  9. package/dist/component/_generated/component.d.ts +93 -3
  10. package/dist/component/_generated/component.d.ts.map +1 -1
  11. package/dist/component/convex.config.d.ts.map +1 -1
  12. package/dist/component/convex.config.js +2 -0
  13. package/dist/component/convex.config.js.map +1 -1
  14. package/dist/component/index.d.ts +5 -3
  15. package/dist/component/index.d.ts.map +1 -1
  16. package/dist/component/index.js +5 -3
  17. package/dist/component/index.js.map +1 -1
  18. package/dist/component/portalBridge.d.ts +80 -0
  19. package/dist/component/portalBridge.d.ts.map +1 -0
  20. package/dist/component/portalBridge.js +102 -0
  21. package/dist/component/portalBridge.js.map +1 -0
  22. package/dist/component/public.d.ts +193 -9
  23. package/dist/component/public.d.ts.map +1 -1
  24. package/dist/component/public.js +204 -33
  25. package/dist/component/public.js.map +1 -1
  26. package/dist/component/schema.d.ts +89 -9
  27. package/dist/component/schema.d.ts.map +1 -1
  28. package/dist/component/schema.js +68 -7
  29. package/dist/component/schema.js.map +1 -1
  30. package/dist/providers/{Anonymous.d.ts → anonymous.d.ts} +8 -8
  31. package/dist/providers/{Anonymous.d.ts.map → anonymous.d.ts.map} +1 -1
  32. package/dist/providers/{Anonymous.js → anonymous.js} +9 -10
  33. package/dist/providers/anonymous.js.map +1 -0
  34. package/dist/providers/{ConvexCredentials.d.ts → credentials.d.ts} +11 -11
  35. package/dist/providers/credentials.d.ts.map +1 -0
  36. package/dist/providers/{ConvexCredentials.js → credentials.js} +8 -8
  37. package/dist/providers/credentials.js.map +1 -0
  38. package/dist/providers/{Email.d.ts → email.d.ts} +6 -6
  39. package/dist/providers/email.d.ts.map +1 -0
  40. package/dist/providers/{Email.js → email.js} +6 -6
  41. package/dist/providers/email.js.map +1 -0
  42. package/dist/providers/passkey.d.ts +20 -0
  43. package/dist/providers/passkey.d.ts.map +1 -0
  44. package/dist/providers/passkey.js +32 -0
  45. package/dist/providers/passkey.js.map +1 -0
  46. package/dist/providers/{Password.d.ts → password.d.ts} +10 -10
  47. package/dist/providers/{Password.d.ts.map → password.d.ts.map} +1 -1
  48. package/dist/providers/{Password.js → password.js} +19 -20
  49. package/dist/providers/password.js.map +1 -0
  50. package/dist/providers/{Phone.d.ts → phone.d.ts} +3 -3
  51. package/dist/providers/{Phone.d.ts.map → phone.d.ts.map} +1 -1
  52. package/dist/providers/{Phone.js → phone.js} +3 -3
  53. package/dist/providers/{Phone.js.map → phone.js.map} +1 -1
  54. package/dist/providers/totp.d.ts +14 -0
  55. package/dist/providers/totp.d.ts.map +1 -0
  56. package/dist/providers/totp.js +23 -0
  57. package/dist/providers/totp.js.map +1 -0
  58. package/dist/server/convex-auth.d.ts +243 -0
  59. package/dist/server/convex-auth.d.ts.map +1 -0
  60. package/dist/server/convex-auth.js +365 -0
  61. package/dist/server/convex-auth.js.map +1 -0
  62. package/dist/server/implementation/index.d.ts +153 -166
  63. package/dist/server/implementation/index.d.ts.map +1 -1
  64. package/dist/server/implementation/index.js +162 -105
  65. package/dist/server/implementation/index.js.map +1 -1
  66. package/dist/server/implementation/passkey.d.ts +33 -0
  67. package/dist/server/implementation/passkey.d.ts.map +1 -0
  68. package/dist/server/implementation/passkey.js +450 -0
  69. package/dist/server/implementation/passkey.js.map +1 -0
  70. package/dist/server/implementation/redirects.d.ts.map +1 -1
  71. package/dist/server/implementation/redirects.js +4 -9
  72. package/dist/server/implementation/redirects.js.map +1 -1
  73. package/dist/server/implementation/sessions.d.ts +2 -20
  74. package/dist/server/implementation/sessions.d.ts.map +1 -1
  75. package/dist/server/implementation/sessions.js +2 -20
  76. package/dist/server/implementation/sessions.js.map +1 -1
  77. package/dist/server/implementation/signIn.d.ts +13 -0
  78. package/dist/server/implementation/signIn.d.ts.map +1 -1
  79. package/dist/server/implementation/signIn.js +26 -1
  80. package/dist/server/implementation/signIn.js.map +1 -1
  81. package/dist/server/implementation/totp.d.ts +40 -0
  82. package/dist/server/implementation/totp.d.ts.map +1 -0
  83. package/dist/server/implementation/totp.js +211 -0
  84. package/dist/server/implementation/totp.js.map +1 -0
  85. package/dist/server/index.d.ts +18 -0
  86. package/dist/server/index.d.ts.map +1 -1
  87. package/dist/server/index.js +255 -0
  88. package/dist/server/index.js.map +1 -1
  89. package/dist/server/portal-email.d.ts +19 -0
  90. package/dist/server/portal-email.d.ts.map +1 -0
  91. package/dist/server/portal-email.js +89 -0
  92. package/dist/server/portal-email.js.map +1 -0
  93. package/dist/server/portal.d.ts +116 -0
  94. package/dist/server/portal.d.ts.map +1 -0
  95. package/dist/server/portal.js +294 -0
  96. package/dist/server/portal.js.map +1 -0
  97. package/dist/server/provider_utils.d.ts +1 -1
  98. package/dist/server/provider_utils.d.ts.map +1 -1
  99. package/dist/server/provider_utils.js +39 -1
  100. package/dist/server/provider_utils.js.map +1 -1
  101. package/dist/server/types.d.ts +128 -11
  102. package/dist/server/types.d.ts.map +1 -1
  103. package/package.json +7 -7
  104. package/src/cli/index.ts +48 -6
  105. package/src/cli/portal-link.ts +112 -0
  106. package/src/cli/portal-upload.ts +411 -0
  107. package/src/client/index.ts +823 -109
  108. package/src/component/_generated/api.ts +72 -1
  109. package/src/component/_generated/component.ts +180 -4
  110. package/src/component/convex.config.ts +3 -0
  111. package/src/component/index.ts +5 -10
  112. package/src/component/portalBridge.ts +116 -0
  113. package/src/component/public.ts +231 -37
  114. package/src/component/schema.ts +70 -7
  115. package/src/providers/{Anonymous.ts → anonymous.ts} +10 -11
  116. package/src/providers/{ConvexCredentials.ts → credentials.ts} +11 -11
  117. package/src/providers/{Email.ts → email.ts} +5 -5
  118. package/src/providers/passkey.ts +35 -0
  119. package/src/providers/{Password.ts → password.ts} +22 -27
  120. package/src/providers/{Phone.ts → phone.ts} +2 -2
  121. package/src/providers/totp.ts +26 -0
  122. package/src/server/convex-auth.ts +470 -0
  123. package/src/server/implementation/index.ts +228 -239
  124. package/src/server/implementation/passkey.ts +650 -0
  125. package/src/server/implementation/redirects.ts +4 -11
  126. package/src/server/implementation/sessions.ts +2 -20
  127. package/src/server/implementation/signIn.ts +39 -1
  128. package/src/server/implementation/totp.ts +366 -0
  129. package/src/server/index.ts +373 -0
  130. package/src/server/portal-email.ts +95 -0
  131. package/src/server/portal.ts +375 -0
  132. package/src/server/provider_utils.ts +42 -1
  133. package/src/server/types.ts +161 -10
  134. package/dist/providers/Anonymous.js.map +0 -1
  135. package/dist/providers/ConvexCredentials.d.ts.map +0 -1
  136. package/dist/providers/ConvexCredentials.js.map +0 -1
  137. package/dist/providers/Email.d.ts.map +0 -1
  138. package/dist/providers/Email.js.map +0 -1
  139. package/dist/providers/Password.js.map +0 -1
  140. package/providers/Anonymous/package.json +0 -6
  141. package/providers/ConvexCredentials/package.json +0 -6
  142. package/providers/Email/package.json +0 -6
  143. package/providers/Password/package.json +0 -6
  144. package/providers/Phone/package.json +0 -6
  145. package/server/package.json +0 -6
@@ -1,49 +1,230 @@
1
- import { FunctionReference, OptionalRestArgs } from "convex/server";
2
1
  import { Value } from "convex/values";
3
- type AuthActionCaller = {
4
- authenticatedCall<Action extends FunctionReference<"action", "public">>(action: Action, ...args: OptionalRestArgs<Action>): Promise<Action["_returnType"]>;
5
- unauthenticatedCall<Action extends FunctionReference<"action", "public">>(action: Action, ...args: OptionalRestArgs<Action>): Promise<Action["_returnType"]>;
6
- verbose?: boolean;
7
- logger?: {
8
- logVerbose?: (message: string) => void;
9
- };
10
- };
11
- export interface TokenStorage {
2
+ /**
3
+ * Structural interface for any Convex client.
4
+ * Satisfied by both `ConvexClient` (`convex/browser`) and
5
+ * `ConvexReactClient` (`convex/react`).
6
+ */
7
+ interface ConvexTransport {
8
+ action(action: any, args: any): Promise<any>;
9
+ setAuth(fetchToken: (args: {
10
+ forceRefreshToken: boolean;
11
+ }) => Promise<string | null | undefined>, onChange?: (isAuthenticated: boolean) => void): void;
12
+ clearAuth(): void;
13
+ }
14
+ /** Pluggable key-value storage (defaults to `localStorage`). */
15
+ export interface Storage {
12
16
  getItem(key: string): string | null | undefined | Promise<string | null | undefined>;
13
17
  setItem(key: string, value: string): void | Promise<void>;
14
18
  removeItem(key: string): void | Promise<void>;
15
19
  }
16
- export type AuthSession = {
17
- token: string;
18
- refreshToken: string;
19
- };
20
- export type SignInResult = {
20
+ type SignInResult = {
21
21
  signingIn: boolean;
22
22
  redirect?: URL;
23
+ totpRequired?: boolean;
24
+ verifier?: string;
23
25
  };
24
- export type AuthSnapshot = {
26
+ /** Reactive auth state snapshot returned by `auth.state` and `auth.onChange`. */
27
+ export type AuthState = {
25
28
  isLoading: boolean;
26
29
  isAuthenticated: boolean;
27
30
  token: string | null;
28
31
  };
29
- export type AuthClientOptions = {
30
- transport: AuthActionCaller;
31
- storage?: TokenStorage | null;
32
- storageNamespace: string;
32
+ /** Options for {@link client}. */
33
+ export type ClientOptions = {
34
+ /** Any Convex client (`ConvexClient` or `ConvexReactClient`). */
35
+ convex: ConvexTransport;
36
+ /**
37
+ * Convex deployment URL. Derived automatically from the client internals
38
+ * when omitted — pass explicitly only if auto-detection fails.
39
+ */
40
+ url?: string;
41
+ /**
42
+ * Key-value storage for persisting tokens.
43
+ *
44
+ * - Defaults to `localStorage` in SPA mode.
45
+ * - Defaults to `null` (in-memory only) when `proxy` is set,
46
+ * since httpOnly cookies handle persistence.
47
+ */
48
+ storage?: Storage | null;
49
+ /** Override how the URL bar is updated after OAuth code exchange. */
33
50
  replaceURL?: (relativeUrl: string) => void | Promise<void>;
34
- shouldHandleCode?: (() => boolean) | boolean;
35
- onChange?: () => Promise<unknown>;
51
+ /**
52
+ * SSR proxy endpoint (e.g. `"/api/auth"`).
53
+ *
54
+ * When set, `signIn`/`signOut`/token refresh POST to this URL
55
+ * (with `credentials: "include"`) instead of calling Convex directly.
56
+ * The server handles httpOnly cookies for token persistence.
57
+ *
58
+ * Pair with {@link ClientOptions.token} for flash-free SSR hydration.
59
+ */
60
+ proxy?: string;
61
+ /**
62
+ * JWT from server-side hydration.
63
+ *
64
+ * In proxy mode the server reads the JWT from an httpOnly cookie
65
+ * and passes it to the client during SSR. This avoids a loading
66
+ * flash on first render — the client is immediately authenticated.
67
+ */
68
+ token?: string | null;
36
69
  };
37
- export declare function createAuthClient(options: AuthClientOptions): {
70
+ /**
71
+ * Create a framework-agnostic auth client.
72
+ *
73
+ * ### SPA mode (default)
74
+ *
75
+ * ```ts
76
+ * import { ConvexClient } from 'convex/browser'
77
+ * import { client } from '\@robelest/convex-auth/client'
78
+ *
79
+ * const convex = new ConvexClient(CONVEX_URL)
80
+ * const auth = client({ convex })
81
+ * ```
82
+ *
83
+ * ### SSR / proxy mode
84
+ *
85
+ * ```ts
86
+ * const auth = client({
87
+ * convex,
88
+ * proxy: '/api/auth',
89
+ * initialToken: tokenFromServer, // read from httpOnly cookie during SSR
90
+ * })
91
+ * ```
92
+ *
93
+ * In proxy mode all auth operations go through the proxy URL.
94
+ * Tokens are stored in httpOnly cookies server-side — the client
95
+ * only holds the JWT in memory.
96
+ */
97
+ export declare function client(options: ClientOptions): {
98
+ /** Current auth state snapshot. */
99
+ readonly state: AuthState;
38
100
  signIn: (provider?: string, args?: FormData | Record<string, Value>) => Promise<SignInResult>;
39
101
  signOut: () => Promise<void>;
40
- fetchAccessToken: ({ forceRefreshToken, }: {
41
- forceRefreshToken: boolean;
42
- }) => Promise<string | null>;
43
- handleCodeFlow: () => Promise<void>;
44
- hydrateFromStorage: () => Promise<void>;
45
- getSnapshot: () => AuthSnapshot;
46
- subscribe: (cb: () => void) => () => boolean;
102
+ onChange: (cb: (state: AuthState) => void) => (() => void);
103
+ /** Passkey (WebAuthn) authentication helpers. */
104
+ passkey: {
105
+ /**
106
+ * Check if WebAuthn passkeys are supported in the current environment.
107
+ */
108
+ isSupported: () => boolean;
109
+ /**
110
+ * Check if conditional UI (autofill-assisted passkey sign-in) is supported.
111
+ *
112
+ * ```ts
113
+ * if (await auth.passkey.isAutofillSupported()) {
114
+ * auth.passkey.authenticate({ autofill: true });
115
+ * }
116
+ * ```
117
+ */
118
+ isAutofillSupported: () => Promise<boolean>;
119
+ /**
120
+ * Register a new passkey for the current or new user.
121
+ *
122
+ * Performs the full two-round-trip WebAuthn registration ceremony:
123
+ * 1. Requests creation options from the server (challenge, RP info)
124
+ * 2. Calls `navigator.credentials.create()` with the options
125
+ * 3. Sends the attestation back to the server for verification
126
+ * 4. Server creates user + account + passkey records and returns tokens
127
+ *
128
+ * Works in both SPA and proxy (SSR) modes.
129
+ *
130
+ * ```ts
131
+ * await auth.passkey.register({ name: "MacBook Touch ID" });
132
+ * ```
133
+ *
134
+ * @param opts.name - Friendly name for this passkey
135
+ * @param opts.email - Email to associate with the new account
136
+ * @param opts.userName - Username for the credential (defaults to email)
137
+ * @param opts.userDisplayName - Display name for the credential
138
+ * @returns `{ signingIn: true }` on success
139
+ */
140
+ register: (opts?: {
141
+ name?: string;
142
+ email?: string;
143
+ userName?: string;
144
+ userDisplayName?: string;
145
+ }) => Promise<SignInResult>;
146
+ /**
147
+ * Authenticate with an existing passkey.
148
+ *
149
+ * Performs the full two-round-trip WebAuthn authentication ceremony:
150
+ * 1. Requests assertion options from the server (challenge, allowed credentials)
151
+ * 2. Calls `navigator.credentials.get()` with the options
152
+ * 3. Sends the assertion back to the server for signature verification
153
+ * 4. Server verifies signature, updates counter, creates session, returns tokens
154
+ *
155
+ * Works in both SPA and proxy (SSR) modes.
156
+ *
157
+ * ```ts
158
+ * // Discoverable credential (no email needed)
159
+ * await auth.passkey.authenticate();
160
+ *
161
+ * // Scoped to a specific user's credentials
162
+ * await auth.passkey.authenticate({ email: "user@example.com" });
163
+ *
164
+ * // Autofill-assisted (conditional UI)
165
+ * await auth.passkey.authenticate({ autofill: true });
166
+ * ```
167
+ *
168
+ * @param opts.email - Scope to credentials for this email's user
169
+ * @param opts.autofill - Use conditional mediation (autofill UI)
170
+ * @returns `{ signingIn: true }` on success
171
+ */
172
+ authenticate: (opts?: {
173
+ email?: string;
174
+ autofill?: boolean;
175
+ }) => Promise<SignInResult>;
176
+ };
177
+ /** TOTP two-factor authentication helpers. */
178
+ totp: {
179
+ /**
180
+ * Start TOTP enrollment. Must be authenticated.
181
+ *
182
+ * Returns a URI for QR code display and a base32 secret for manual entry.
183
+ *
184
+ * ```ts
185
+ * const setup = await auth.totp.setup();
186
+ * // Display QR code from setup.uri
187
+ * // Or show setup.secret for manual entry
188
+ * ```
189
+ */
190
+ setup: (opts?: {
191
+ name?: string;
192
+ accountName?: string;
193
+ }) => Promise<{
194
+ uri: string;
195
+ secret: string;
196
+ verifier: string;
197
+ totpId: string;
198
+ }>;
199
+ /**
200
+ * Complete TOTP enrollment by verifying the first code from the authenticator app.
201
+ *
202
+ * ```ts
203
+ * await auth.totp.confirm({ code: "123456", verifier: setup.verifier, totpId: setup.totpId });
204
+ * ```
205
+ */
206
+ confirm: (opts: {
207
+ code: string;
208
+ verifier: string;
209
+ totpId: string;
210
+ }) => Promise<void>;
211
+ /**
212
+ * Complete 2FA verification during sign-in.
213
+ *
214
+ * Called after a credentials sign-in returns `totpRequired: true`.
215
+ *
216
+ * ```ts
217
+ * const result = await auth.signIn("password", { email, password });
218
+ * if (result.totpRequired) {
219
+ * await auth.totp.verify({ code: "123456", verifier: result.verifier! });
220
+ * }
221
+ * ```
222
+ */
223
+ verify: (opts: {
224
+ code: string;
225
+ verifier: string;
226
+ }) => Promise<void>;
227
+ };
47
228
  };
48
229
  export {};
49
230
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,E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