@robelest/convex-auth 0.0.2-preview.2 → 0.0.3-preview
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/dist/bin.cjs +467 -64
- package/dist/client/index.d.ts +127 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +424 -1
- package/dist/client/index.js.map +1 -1
- package/dist/component/_generated/api.d.ts +56 -1
- package/dist/component/_generated/api.d.ts.map +1 -1
- package/dist/component/_generated/api.js.map +1 -1
- package/dist/component/_generated/component.d.ts +141 -3
- package/dist/component/_generated/component.d.ts.map +1 -1
- package/dist/component/convex.config.d.ts.map +1 -1
- package/dist/component/convex.config.js +2 -0
- package/dist/component/convex.config.js.map +1 -1
- package/dist/component/index.d.ts +5 -4
- package/dist/component/index.d.ts.map +1 -1
- package/dist/component/index.js +4 -3
- package/dist/component/index.js.map +1 -1
- package/dist/component/portalBridge.d.ts +80 -0
- package/dist/component/portalBridge.d.ts.map +1 -0
- package/dist/component/portalBridge.js +102 -0
- package/dist/component/portalBridge.js.map +1 -0
- package/dist/component/public.d.ts +353 -9
- package/dist/component/public.d.ts.map +1 -1
- package/dist/component/public.js +328 -33
- package/dist/component/public.js.map +1 -1
- package/dist/component/schema.d.ts +168 -9
- package/dist/component/schema.d.ts.map +1 -1
- package/dist/component/schema.js +113 -7
- package/dist/component/schema.js.map +1 -1
- package/dist/providers/passkey.d.ts +20 -0
- package/dist/providers/passkey.d.ts.map +1 -0
- package/dist/providers/passkey.js +32 -0
- package/dist/providers/passkey.js.map +1 -0
- package/dist/providers/totp.d.ts +14 -0
- package/dist/providers/totp.d.ts.map +1 -0
- package/dist/providers/totp.js +23 -0
- package/dist/providers/totp.js.map +1 -0
- package/dist/server/convex-auth.d.ts +296 -0
- package/dist/server/convex-auth.d.ts.map +1 -0
- package/dist/server/convex-auth.js +480 -0
- package/dist/server/convex-auth.js.map +1 -0
- package/dist/server/email-templates.d.ts +18 -0
- package/dist/server/email-templates.d.ts.map +1 -0
- package/dist/server/email-templates.js +74 -0
- package/dist/server/email-templates.js.map +1 -0
- package/dist/server/implementation/apiKey.d.ts +74 -0
- package/dist/server/implementation/apiKey.d.ts.map +1 -0
- package/dist/server/implementation/apiKey.js +140 -0
- package/dist/server/implementation/apiKey.js.map +1 -0
- package/dist/server/implementation/index.d.ts +169 -7
- package/dist/server/implementation/index.d.ts.map +1 -1
- package/dist/server/implementation/index.js +220 -5
- package/dist/server/implementation/index.js.map +1 -1
- package/dist/server/implementation/passkey.d.ts +33 -0
- package/dist/server/implementation/passkey.d.ts.map +1 -0
- package/dist/server/implementation/passkey.js +450 -0
- package/dist/server/implementation/passkey.js.map +1 -0
- package/dist/server/implementation/redirects.d.ts.map +1 -1
- package/dist/server/implementation/redirects.js +4 -9
- package/dist/server/implementation/redirects.js.map +1 -1
- package/dist/server/implementation/signIn.d.ts +13 -0
- package/dist/server/implementation/signIn.d.ts.map +1 -1
- package/dist/server/implementation/signIn.js +29 -15
- package/dist/server/implementation/signIn.js.map +1 -1
- package/dist/server/implementation/totp.d.ts +40 -0
- package/dist/server/implementation/totp.d.ts.map +1 -0
- package/dist/server/implementation/totp.js +211 -0
- package/dist/server/implementation/totp.js.map +1 -0
- package/dist/server/index.d.ts +26 -2
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +63 -16
- package/dist/server/index.js.map +1 -1
- package/dist/server/portal-email.d.ts +19 -0
- package/dist/server/portal-email.d.ts.map +1 -0
- package/dist/server/portal-email.js +89 -0
- package/dist/server/portal-email.js.map +1 -0
- package/dist/server/provider_utils.d.ts +3 -1
- package/dist/server/provider_utils.d.ts.map +1 -1
- package/dist/server/provider_utils.js +39 -1
- package/dist/server/provider_utils.js.map +1 -1
- package/dist/server/types.d.ts +263 -4
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/version.d.ts +2 -0
- package/dist/server/version.d.ts.map +1 -0
- package/dist/server/version.js +3 -0
- package/dist/server/version.js.map +1 -0
- package/package.json +7 -3
- package/src/cli/index.ts +49 -7
- package/src/cli/portal-link.ts +112 -0
- package/src/cli/portal-upload.ts +411 -0
- package/src/cli/utils.ts +248 -0
- package/src/client/index.ts +489 -1
- package/src/component/_generated/api.ts +72 -1
- package/src/component/_generated/component.ts +241 -4
- package/src/component/convex.config.ts +3 -0
- package/src/component/index.ts +8 -3
- package/src/component/portalBridge.ts +116 -0
- package/src/component/public.ts +373 -37
- package/src/component/schema.ts +122 -7
- package/src/providers/passkey.ts +35 -0
- package/src/providers/totp.ts +26 -0
- package/src/server/convex-auth.ts +602 -0
- package/src/server/email-templates.ts +77 -0
- package/src/server/implementation/apiKey.ts +185 -0
- package/src/server/implementation/index.ts +301 -8
- package/src/server/implementation/passkey.ts +650 -0
- package/src/server/implementation/redirects.ts +4 -11
- package/src/server/implementation/signIn.ts +41 -13
- package/src/server/implementation/totp.ts +366 -0
- package/src/server/index.ts +98 -34
- package/src/server/portal-email.ts +95 -0
- package/src/server/provider_utils.ts +42 -1
- package/src/server/types.ts +285 -4
- package/src/server/version.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider_utils.d.ts","sourceRoot":"","sources":["../../src/server/provider_utils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB;;;;;;
|
|
1
|
+
{"version":3,"file":"provider_utils.d.ts","sourceRoot":"","sources":["../../src/server/provider_utils.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,UAAU,EAEX,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,kBAAkB,EAClB,8BAA8B,EAC9B,gBAAgB,EACjB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,gBAAgB;;;;;;uBAGzB,CAAC;0BAM3B,CAAC;;;kBAQJ,CAAC;;;+BAaO,CAAC;;;;;gBAoFqB,CAAC;;;0BAoBrB,CAAC;;;;;qBAuCmB,CAAC;qBAC3B,CAAN;6BACQ,CAAF;6BACqB,CAAC;;sBAOpB,CAAC;;iCA0BiB,CAAC;;;;;;qBAiBypB,CAAC;qBAAyB,CAAC;6BAAiC,CAAC;6BAAkC,CAAC;;sBAAgI,CAAC;;;EAhNp5B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,kBAAkB,GAGhC,8BAA8B,CAC7D;AAiID,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAI5D,wBAAgB,iBAAiB,CAC/B,CAAC,CAAC,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC,EACvC,MAAM,CAAC,EAAE,MAAM;;;;;;;;cAmBhB;AAID;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAgBzD;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,EACzC,mBAAmB,EAAE,OAAO,UAQ7B"}
|
|
@@ -55,8 +55,38 @@ function materializeAndDefaultProviders(config_) {
|
|
|
55
55
|
// Have to materialize first so that the correct env variables are used
|
|
56
56
|
const providers = config_.providers.map((provider) => providerDefaults(typeof provider === "function" ? provider() : provider));
|
|
57
57
|
const config = { ...config_, providers };
|
|
58
|
+
// setEnvDefaults is from Auth.js and only works with Auth.js provider types.
|
|
59
|
+
// Filter out passkey and TOTP providers before passing to setEnvDefaults,
|
|
60
|
+
// then reinsert them at their original positions.
|
|
61
|
+
const passkeyIndices = [];
|
|
62
|
+
const passkeyProviders = [];
|
|
63
|
+
const totpIndices = [];
|
|
64
|
+
const totpProviders = [];
|
|
65
|
+
const filteredProviders = config.providers.filter((p, i) => {
|
|
66
|
+
if (p.type === "passkey") {
|
|
67
|
+
passkeyIndices.push(i);
|
|
68
|
+
passkeyProviders.push(p);
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
if (p.type === "totp") {
|
|
72
|
+
totpIndices.push(i);
|
|
73
|
+
totpProviders.push(p);
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
return true;
|
|
77
|
+
});
|
|
58
78
|
// Unfortunately mutates its argument
|
|
59
|
-
|
|
79
|
+
const tempConfig = { ...config, providers: filteredProviders };
|
|
80
|
+
setEnvDefaults(process.env, tempConfig);
|
|
81
|
+
// Reinsert passkey and TOTP providers at their original positions
|
|
82
|
+
const merged = [...tempConfig.providers];
|
|
83
|
+
for (let i = 0; i < passkeyIndices.length; i++) {
|
|
84
|
+
merged.splice(passkeyIndices[i], 0, passkeyProviders[i]);
|
|
85
|
+
}
|
|
86
|
+
for (let i = 0; i < totpIndices.length; i++) {
|
|
87
|
+
merged.splice(totpIndices[i], 0, totpProviders[i]);
|
|
88
|
+
}
|
|
89
|
+
config.providers = merged;
|
|
60
90
|
// Manually do this for new provider type
|
|
61
91
|
config.providers.forEach((provider) => {
|
|
62
92
|
if (provider.type === "phone") {
|
|
@@ -69,6 +99,14 @@ function materializeAndDefaultProviders(config_) {
|
|
|
69
99
|
return config;
|
|
70
100
|
}
|
|
71
101
|
function providerDefaults(provider) {
|
|
102
|
+
// Passkey providers don't use Auth.js options merge or OAuth normalization
|
|
103
|
+
if (provider.type === "passkey") {
|
|
104
|
+
return provider;
|
|
105
|
+
}
|
|
106
|
+
// TOTP providers don't use Auth.js options merge or OAuth normalization
|
|
107
|
+
if (provider.type === "totp") {
|
|
108
|
+
return provider;
|
|
109
|
+
}
|
|
72
110
|
// TODO: Add `redirectProxyUrl` to oauth providers
|
|
73
111
|
const merged = merge(provider, provider.options);
|
|
74
112
|
return merged.type === "oauth" || merged.type === "oidc"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"provider_utils.js","sourceRoot":"","sources":["../../src/server/provider_utils.ts"],"names":[],"mappings":"AAAA,oDAAoD;AACpD,EAAE;AACF,cAAc;AACd,EAAE;AACF,wCAAwC;AACxC,EAAE;AACF,2EAA2E;AAC3E,yEAAyE;AACzE,oEAAoE;AACpE,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,0EAA0E;AAC1E,yEAAyE;AACzE,wEAAwE;AACxE,0EAA0E;AAC1E,iEAAiE;AAEjE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAgB5C;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAyB;IACtD,MAAM,MAAM,GAAG,8BAA8B,CAAC,OAAO,CAAC,CAAC;IACvD,0BAA0B;IAC1B,MAAM,cAAc,GAAG,MAAM,CAAC,SAAS;SACpC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC;SACvC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC;SAC5B,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAClC,OAAO;QACL,GAAG,MAAM;QACT,cAAc,EAAE,oBAAoB,CAAC,cAAc,CAAC;QACpD,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI;YACrB,WAAW,EAAE,MAAM;YACnB,IAAI,EAAE,EAAE;YACR,UAAU,EAAE,EAAE;YACd,UAAU,EAAE,EAAE;SACf;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,QAA4B;IAC9D,MAAM,MAAM,GAAG,EAAE,SAAS,EAAE,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,EAAS,EAAE,CAAC;IAC/D,8BAA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CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;SACxD,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,KAAK,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IAC3C,OAAO,kBAAkB,CAAC,MAAM,GAAG,CAAC;QAClC,CAAC,CAAC,kBAAkB,CAAC,IAAI,CAAC,IAAI,CAAC;QAC/B,CAAC,CAAC,mCAAmC,CAAC;AAC1C,CAAC"}
|
package/dist/server/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Provider as AuthjsProviderConfig, CredentialsConfig, EmailConfig as AuthjsEmailConfig, OAuth2Config, OIDCConfig } from "@auth/core/providers";
|
|
2
|
-
import { Theme } from "@auth/core/types";
|
|
2
|
+
import { Awaitable, 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
5
|
import { CredentialsUserConfig } from "../providers/credentials.js";
|
|
@@ -69,6 +69,60 @@ export type ConvexAuthConfig = {
|
|
|
69
69
|
*/
|
|
70
70
|
maxFailedAttempsPerHour?: number;
|
|
71
71
|
};
|
|
72
|
+
/**
|
|
73
|
+
* API key configuration for programmatic access.
|
|
74
|
+
*
|
|
75
|
+
* Enables `auth.key.*` helpers for creating, verifying, and managing
|
|
76
|
+
* API keys with scoped permissions and optional per-key rate limiting.
|
|
77
|
+
*/
|
|
78
|
+
apiKeys?: ApiKeyConfig;
|
|
79
|
+
/**
|
|
80
|
+
* Email transport configuration.
|
|
81
|
+
*
|
|
82
|
+
* Required for magic link authentication and the admin portal.
|
|
83
|
+
* The library generates email content (subject, styled HTML); you
|
|
84
|
+
* provide the delivery mechanism — Resend, SendGrid, SES, Postmark,
|
|
85
|
+
* or any other provider.
|
|
86
|
+
*
|
|
87
|
+
* When configured, a magic link email provider (`id: "email"`) is
|
|
88
|
+
* auto-registered — no need to add a separate Auth.js email provider
|
|
89
|
+
* to `providers`.
|
|
90
|
+
*
|
|
91
|
+
* Works seamlessly with the `@convex-dev/resend` Convex component:
|
|
92
|
+
*
|
|
93
|
+
* ```ts
|
|
94
|
+
* import { Resend } from "@convex-dev/resend";
|
|
95
|
+
*
|
|
96
|
+
* const resend = new Resend(components.resend, { testMode: false });
|
|
97
|
+
*
|
|
98
|
+
* const auth = new Auth(components.auth, {
|
|
99
|
+
* providers: [google],
|
|
100
|
+
* email: {
|
|
101
|
+
* from: "My App <noreply@example.com>",
|
|
102
|
+
* send: (ctx, params) => resend.sendEmail(ctx, params),
|
|
103
|
+
* },
|
|
104
|
+
* });
|
|
105
|
+
* ```
|
|
106
|
+
*
|
|
107
|
+
* Or with any email API directly:
|
|
108
|
+
*
|
|
109
|
+
* ```ts
|
|
110
|
+
* email: {
|
|
111
|
+
* from: "My App <noreply@example.com>",
|
|
112
|
+
* send: async (_ctx, { from, to, subject, html }) => {
|
|
113
|
+
* await fetch("https://api.resend.com/emails", {
|
|
114
|
+
* method: "POST",
|
|
115
|
+
* headers: {
|
|
116
|
+
* Authorization: `Bearer ${process.env.AUTH_RESEND_KEY}`,
|
|
117
|
+
* "Content-Type": "application/json",
|
|
118
|
+
* },
|
|
119
|
+
* body: JSON.stringify({ from, to, subject, html }),
|
|
120
|
+
* });
|
|
121
|
+
* },
|
|
122
|
+
* },
|
|
123
|
+
* ```
|
|
124
|
+
*/
|
|
125
|
+
email?: EmailTransport;
|
|
72
126
|
callbacks?: {
|
|
73
127
|
/**
|
|
74
128
|
* Control which URLs are allowed as a destination after OAuth sign-in
|
|
@@ -217,17 +271,33 @@ export type ConvexAuthConfig = {
|
|
|
217
271
|
* for verification via SMS or another phone-number-connected messaging
|
|
218
272
|
* service.
|
|
219
273
|
*/
|
|
220
|
-
export type AuthProviderConfig = Exclude<AuthjsProviderConfig, CredentialsConfig | ((...args: any) => CredentialsConfig)> | ConvexCredentialsConfig | ((...args: any) => ConvexCredentialsConfig) | PhoneConfig | ((...args: any) => PhoneConfig);
|
|
274
|
+
export type AuthProviderConfig = Exclude<AuthjsProviderConfig, CredentialsConfig | ((...args: any) => CredentialsConfig)> | ConvexCredentialsConfig | ((...args: any) => ConvexCredentialsConfig) | PhoneConfig | ((...args: any) => PhoneConfig) | PasskeyProviderConfig | ((...args: any) => PasskeyProviderConfig) | TotpProviderConfig | ((...args: any) => TotpProviderConfig);
|
|
221
275
|
/**
|
|
222
276
|
* Extends the standard Auth.js email provider config
|
|
223
277
|
* to allow additional checks during token verification.
|
|
224
278
|
*/
|
|
225
279
|
export interface EmailConfig<DataModel extends GenericDataModel = GenericDataModel> extends AuthjsEmailConfig {
|
|
280
|
+
/**
|
|
281
|
+
* Send the verification token to the user.
|
|
282
|
+
*
|
|
283
|
+
* Overrides the Auth.js 1-arg signature to accept an optional
|
|
284
|
+
* Convex action context as the second argument. Library-native
|
|
285
|
+
* email providers use `ctx` to call `email.send(ctx, params)`.
|
|
286
|
+
*/
|
|
287
|
+
sendVerificationRequest: (params: {
|
|
288
|
+
identifier: string;
|
|
289
|
+
url: string;
|
|
290
|
+
expires: Date;
|
|
291
|
+
provider: AuthjsEmailConfig;
|
|
292
|
+
token: string;
|
|
293
|
+
theme: Theme;
|
|
294
|
+
request: Request;
|
|
295
|
+
}, ctx?: GenericActionCtx<AnyDataModel>) => Awaitable<void>;
|
|
226
296
|
/**
|
|
227
297
|
* Before the token is verified, check other
|
|
228
298
|
* provided parameters.
|
|
229
299
|
*
|
|
230
|
-
* Used to make sure
|
|
300
|
+
* Used to make sure that OTPs are accompanied
|
|
231
301
|
* with the correct email address.
|
|
232
302
|
*/
|
|
233
303
|
authorize?: (
|
|
@@ -305,6 +375,48 @@ export type ConvexCredentialsConfig = CredentialsUserConfig<any> & {
|
|
|
305
375
|
type: "credentials";
|
|
306
376
|
id: string;
|
|
307
377
|
};
|
|
378
|
+
/**
|
|
379
|
+
* Configuration for the passkey (WebAuthn) provider.
|
|
380
|
+
*/
|
|
381
|
+
export interface PasskeyProviderConfig {
|
|
382
|
+
id: string;
|
|
383
|
+
type: "passkey";
|
|
384
|
+
options: {
|
|
385
|
+
/** Relying Party display name. Defaults to SITE_URL hostname. */
|
|
386
|
+
rpName?: string;
|
|
387
|
+
/** Relying Party ID (hostname). Defaults to SITE_URL hostname. */
|
|
388
|
+
rpId?: string;
|
|
389
|
+
/** Allowed origins for credential verification. Defaults to SITE_URL. */
|
|
390
|
+
origin?: string | string[];
|
|
391
|
+
/** Attestation conveyance preference. Defaults to "none". */
|
|
392
|
+
attestation?: "none" | "direct";
|
|
393
|
+
/** User verification requirement. Defaults to "required". */
|
|
394
|
+
userVerification?: "required" | "preferred" | "discouraged";
|
|
395
|
+
/** Resident key (discoverable credential) preference. Defaults to "preferred". */
|
|
396
|
+
residentKey?: "required" | "preferred" | "discouraged";
|
|
397
|
+
/** Restrict to platform or cross-platform authenticators. */
|
|
398
|
+
authenticatorAttachment?: "platform" | "cross-platform";
|
|
399
|
+
/** Supported COSE algorithms. Defaults to [-7 (ES256), -257 (RS256)]. */
|
|
400
|
+
algorithms?: number[];
|
|
401
|
+
/** Challenge expiration in ms. Defaults to 300_000 (5 minutes). */
|
|
402
|
+
challengeExpirationMs?: number;
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
/**
|
|
406
|
+
* Configuration for the TOTP two-factor authentication provider.
|
|
407
|
+
*/
|
|
408
|
+
export interface TotpProviderConfig {
|
|
409
|
+
id: string;
|
|
410
|
+
type: "totp";
|
|
411
|
+
options: {
|
|
412
|
+
/** Issuer name shown in authenticator apps (e.g. "My App"). */
|
|
413
|
+
issuer: string;
|
|
414
|
+
/** Number of digits in each code (default: 6). */
|
|
415
|
+
digits: number;
|
|
416
|
+
/** Time period in seconds for code rotation (default: 30). */
|
|
417
|
+
period: number;
|
|
418
|
+
};
|
|
419
|
+
}
|
|
308
420
|
export type AuthAccountCredentials = {
|
|
309
421
|
id: string;
|
|
310
422
|
secret?: string;
|
|
@@ -388,7 +500,133 @@ export type ConvexAuthMaterializedConfig = {
|
|
|
388
500
|
/**
|
|
389
501
|
* Materialized Auth.js provider config.
|
|
390
502
|
*/
|
|
391
|
-
export type AuthProviderMaterializedConfig = OIDCConfig<any> | OAuth2Config<any> | EmailConfig | PhoneConfig | ConvexCredentialsConfig;
|
|
503
|
+
export type AuthProviderMaterializedConfig = OIDCConfig<any> | OAuth2Config<any> | EmailConfig | PhoneConfig | ConvexCredentialsConfig | PasskeyProviderConfig | TotpProviderConfig;
|
|
504
|
+
/**
|
|
505
|
+
* Email delivery parameters passed to `EmailTransport.send`.
|
|
506
|
+
*/
|
|
507
|
+
export interface EmailMessage {
|
|
508
|
+
/** Sender address (from `email.from` in your Auth config). */
|
|
509
|
+
from: string;
|
|
510
|
+
/** Recipient email address. */
|
|
511
|
+
to: string;
|
|
512
|
+
/** Email subject line. */
|
|
513
|
+
subject: string;
|
|
514
|
+
/** HTML body content. */
|
|
515
|
+
html: string;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Email transport configuration for the Auth library.
|
|
519
|
+
*
|
|
520
|
+
* Provides a delivery mechanism for library-generated emails
|
|
521
|
+
* (magic links, portal admin sign-in). The library owns the
|
|
522
|
+
* email content; you provide the transport.
|
|
523
|
+
*/
|
|
524
|
+
export interface EmailTransport {
|
|
525
|
+
/** Sender address shown in the From field (e.g. "My App \<noreply@example.com\>"). */
|
|
526
|
+
from: string;
|
|
527
|
+
/**
|
|
528
|
+
* Deliver an email. Called by the library for magic links and portal emails.
|
|
529
|
+
*
|
|
530
|
+
* Receives the Convex action context as the first argument, enabling
|
|
531
|
+
* use with Convex components like `@convex-dev/resend`:
|
|
532
|
+
*
|
|
533
|
+
* ```ts
|
|
534
|
+
* send: (ctx, params) => resend.sendEmail(ctx, params)
|
|
535
|
+
* ```
|
|
536
|
+
*
|
|
537
|
+
* For plain HTTP email APIs, ignore the `ctx` parameter:
|
|
538
|
+
*
|
|
539
|
+
* ```ts
|
|
540
|
+
* send: async (_ctx, { from, to, subject, html }) => {
|
|
541
|
+
* await fetch("https://api.resend.com/emails", { ... });
|
|
542
|
+
* }
|
|
543
|
+
* ```
|
|
544
|
+
*/
|
|
545
|
+
send: (ctx: GenericActionCtx<any>, params: EmailMessage) => Promise<void>;
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* A single scope entry stored per API key.
|
|
549
|
+
* Uses a resource:action pattern for structured permissions.
|
|
550
|
+
*
|
|
551
|
+
* ```ts
|
|
552
|
+
* { resource: "users", actions: ["read", "list"] }
|
|
553
|
+
* ```
|
|
554
|
+
*/
|
|
555
|
+
export interface KeyScope {
|
|
556
|
+
resource: string;
|
|
557
|
+
actions: string[];
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Result of scope verification. Provides a `.can()` helper
|
|
561
|
+
* for checking if a key has a specific permission.
|
|
562
|
+
*
|
|
563
|
+
* ```ts
|
|
564
|
+
* const result = await auth.key.verify(ctx, rawKey);
|
|
565
|
+
* if (result.scopes.can("users", "read")) {
|
|
566
|
+
* // authorized
|
|
567
|
+
* }
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
export interface ScopeChecker {
|
|
571
|
+
/** Check if the key has permission for a given resource:action. */
|
|
572
|
+
can(resource: string, action: string): boolean;
|
|
573
|
+
/** The raw scope entries from the key. */
|
|
574
|
+
scopes: KeyScope[];
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* Configuration for API key support on the Auth class.
|
|
578
|
+
*
|
|
579
|
+
* ```ts
|
|
580
|
+
* const auth = new Auth(components.auth, {
|
|
581
|
+
* providers: [github],
|
|
582
|
+
* apiKeys: {
|
|
583
|
+
* scopes: {
|
|
584
|
+
* users: ["read", "list", "create", "delete"],
|
|
585
|
+
* messages: ["read", "write"],
|
|
586
|
+
* },
|
|
587
|
+
* defaultRateLimit: { maxRequests: 1000, windowMs: 3600000 },
|
|
588
|
+
* },
|
|
589
|
+
* });
|
|
590
|
+
* ```
|
|
591
|
+
*/
|
|
592
|
+
export interface ApiKeyConfig {
|
|
593
|
+
/**
|
|
594
|
+
* Define the available resource:action scopes for your API keys.
|
|
595
|
+
* Keys can only be created with scopes that are a subset of these.
|
|
596
|
+
*/
|
|
597
|
+
scopes?: Record<string, string[]>;
|
|
598
|
+
/**
|
|
599
|
+
* Default rate limit applied to new keys when not specified per-key.
|
|
600
|
+
* Uses a token-bucket algorithm.
|
|
601
|
+
*/
|
|
602
|
+
defaultRateLimit?: {
|
|
603
|
+
maxRequests: number;
|
|
604
|
+
windowMs: number;
|
|
605
|
+
};
|
|
606
|
+
/**
|
|
607
|
+
* Key prefix. Defaults to `"sk_live_"`.
|
|
608
|
+
*/
|
|
609
|
+
prefix?: string;
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* An API key record as returned by `auth.key.list()` and `auth.key.get()`.
|
|
613
|
+
* Never includes the raw key material — only the display prefix.
|
|
614
|
+
*/
|
|
615
|
+
export interface KeyRecord {
|
|
616
|
+
_id: string;
|
|
617
|
+
userId: string;
|
|
618
|
+
prefix: string;
|
|
619
|
+
name: string;
|
|
620
|
+
scopes: KeyScope[];
|
|
621
|
+
rateLimit?: {
|
|
622
|
+
maxRequests: number;
|
|
623
|
+
windowMs: number;
|
|
624
|
+
};
|
|
625
|
+
expiresAt?: number;
|
|
626
|
+
lastUsedAt?: number;
|
|
627
|
+
createdAt: number;
|
|
628
|
+
revoked: boolean;
|
|
629
|
+
}
|
|
392
630
|
/**
|
|
393
631
|
* Component function references required by core auth runtime.
|
|
394
632
|
*/
|
|
@@ -443,9 +681,30 @@ export type AuthComponentApi = {
|
|
|
443
681
|
memberUpdate: FunctionReference<"mutation", "internal">;
|
|
444
682
|
inviteCreate: FunctionReference<"mutation", "internal">;
|
|
445
683
|
inviteGet: FunctionReference<"query", "internal">;
|
|
684
|
+
inviteGetByTokenHash: FunctionReference<"query", "internal">;
|
|
446
685
|
inviteList: FunctionReference<"query", "internal">;
|
|
447
686
|
inviteAccept: FunctionReference<"mutation", "internal">;
|
|
448
687
|
inviteRevoke: FunctionReference<"mutation", "internal">;
|
|
688
|
+
keyInsert: FunctionReference<"mutation", "internal">;
|
|
689
|
+
keyGetByHashedKey: FunctionReference<"query", "internal">;
|
|
690
|
+
keyGetById: FunctionReference<"query", "internal">;
|
|
691
|
+
keyList: FunctionReference<"query", "internal">;
|
|
692
|
+
keyListByUserId: FunctionReference<"query", "internal">;
|
|
693
|
+
keyPatch: FunctionReference<"mutation", "internal">;
|
|
694
|
+
keyDelete: FunctionReference<"mutation", "internal">;
|
|
695
|
+
passkeyInsert: FunctionReference<"mutation", "internal">;
|
|
696
|
+
passkeyGetByCredentialId: FunctionReference<"query", "internal">;
|
|
697
|
+
passkeyListByUserId: FunctionReference<"query", "internal">;
|
|
698
|
+
passkeyUpdateCounter: FunctionReference<"mutation", "internal">;
|
|
699
|
+
passkeyUpdateMeta: FunctionReference<"mutation", "internal">;
|
|
700
|
+
passkeyDelete: FunctionReference<"mutation", "internal">;
|
|
701
|
+
totpInsert: FunctionReference<"mutation", "internal", any, any>;
|
|
702
|
+
totpGetVerifiedByUserId: FunctionReference<"query", "internal", any, any>;
|
|
703
|
+
totpListByUserId: FunctionReference<"query", "internal", any, any>;
|
|
704
|
+
totpGetById: FunctionReference<"query", "internal", any, any>;
|
|
705
|
+
totpMarkVerified: FunctionReference<"mutation", "internal", any, any>;
|
|
706
|
+
totpUpdateLastUsed: FunctionReference<"mutation", "internal", any, any>;
|
|
707
|
+
totpDelete: FunctionReference<"mutation", "internal", any, any>;
|
|
449
708
|
};
|
|
450
709
|
};
|
|
451
710
|
//# 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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,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/server/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robelest/convex-auth",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.3-preview",
|
|
4
4
|
"description": "Authentication for Convex",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"authentication",
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
"bin": "./dist/bin.cjs",
|
|
24
24
|
"sideEffects": false,
|
|
25
25
|
"scripts": {
|
|
26
|
+
"build:version": "node ../../scripts/generate-version.js",
|
|
26
27
|
"build:bin": "esbuild src/cli/index.ts --bundle --platform=node --format=cjs --outfile=dist/bin.cjs",
|
|
27
28
|
"build:server": "tsc --project tsconfig.server.json",
|
|
28
29
|
"build:client": "tsc --project tsconfig.client.json",
|
|
29
30
|
"build:component": "tsc --project tsconfig.component.json",
|
|
30
|
-
"build": "rm -rf dist && bun run build:bin && bun run build:server && bun run build:client && bun run build:component",
|
|
31
|
+
"build": "rm -rf dist && bun run build:version && bun run build:bin && bun run build:server && bun run build:client && bun run build:component",
|
|
31
32
|
"docs": "bun run --cwd ../../docs dev",
|
|
32
|
-
"lint": "tsc && bun run --cwd ../.. lint",
|
|
33
|
+
"lint": "tsc --project tsconfig.server.json --noEmit && tsc --project tsconfig.client.json --noEmit && tsc --project tsconfig.component.json --noEmit && bun run --cwd ../.. lint",
|
|
33
34
|
"spellcheck": "cspell \"docs/pages/**/*.md*\"",
|
|
34
35
|
"prepare": "bun run build",
|
|
35
36
|
"prepublishOnly": "bun run lint && bun run build && bun run test:once",
|
|
@@ -72,8 +73,11 @@
|
|
|
72
73
|
}
|
|
73
74
|
},
|
|
74
75
|
"dependencies": {
|
|
76
|
+
"@convex-dev/self-hosting": "^0.1.0",
|
|
75
77
|
"@oslojs/crypto": "^1.0.1",
|
|
76
78
|
"@oslojs/encoding": "^1.1.0",
|
|
79
|
+
"@oslojs/otp": "^1.1.0",
|
|
80
|
+
"@oslojs/webauthn": "^1.0.0",
|
|
77
81
|
"cookie": "^1.1.1",
|
|
78
82
|
"jose": "^6.1.3",
|
|
79
83
|
"jwt-decode": "^4.0.0",
|
package/src/cli/index.ts
CHANGED
|
@@ -11,12 +11,50 @@ import * as v from "valibot";
|
|
|
11
11
|
import { actionDescription } from "./command.js";
|
|
12
12
|
import { generateKeys } from "./generateKeys.js";
|
|
13
13
|
|
|
14
|
-
new Command()
|
|
14
|
+
const program = new Command()
|
|
15
15
|
.name("@robelest/convex-auth")
|
|
16
16
|
.description(
|
|
17
17
|
"Add code and set environment variables for @robelest/convex-auth.\n\n" +
|
|
18
18
|
"Full docs: https://deepwiki.com/robelest/convex-auth",
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
// ---- Portal subcommand ----
|
|
22
|
+
const portalCmd = program
|
|
23
|
+
.command("portal")
|
|
24
|
+
.description("Manage the auth admin portal");
|
|
25
|
+
|
|
26
|
+
portalCmd
|
|
27
|
+
.command("upload")
|
|
28
|
+
.description("Upload portal static files to Convex storage")
|
|
29
|
+
.allowUnknownOption(true)
|
|
30
|
+
.allowExcessArguments(true)
|
|
31
|
+
.action(async () => {
|
|
32
|
+
// Pass remaining args after "portal upload" to the upload handler
|
|
33
|
+
const idx = process.argv.indexOf("upload");
|
|
34
|
+
const uploadArgs = idx >= 0 ? process.argv.slice(idx + 1) : [];
|
|
35
|
+
const { portalUploadMain } = await import("./portal-upload.js");
|
|
36
|
+
await portalUploadMain(uploadArgs);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
portalCmd
|
|
40
|
+
.command("link")
|
|
41
|
+
.description("Generate an admin invite link for the portal")
|
|
42
|
+
.option("--prod", "Use production deployment")
|
|
43
|
+
.option(
|
|
44
|
+
"--component <name>",
|
|
45
|
+
"Convex module with portal functions",
|
|
46
|
+
"auth",
|
|
19
47
|
)
|
|
48
|
+
.action(async (opts) => {
|
|
49
|
+
const { portalLinkMain } = await import("./portal-link.js");
|
|
50
|
+
await portalLinkMain({
|
|
51
|
+
prod: opts.prod ?? false,
|
|
52
|
+
component: opts.component,
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
// ---- Default setup command ----
|
|
57
|
+
program
|
|
20
58
|
.option(
|
|
21
59
|
"--site-url <url>",
|
|
22
60
|
"Your frontend app URL (e.g. 'http://localhost:5173' for dev, 'https://myapp.com' for prod)",
|
|
@@ -93,8 +131,9 @@ new Command()
|
|
|
93
131
|
} else {
|
|
94
132
|
printFinalSuccessMessage(config);
|
|
95
133
|
}
|
|
96
|
-
})
|
|
97
|
-
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
program.parse(process.argv);
|
|
98
137
|
|
|
99
138
|
type ProjectConfig = {
|
|
100
139
|
isExpo: boolean;
|
|
@@ -398,7 +437,7 @@ async function configureConvexConfig(config: ProjectConfig) {
|
|
|
398
437
|
logStep(config, "Configure convex config file");
|
|
399
438
|
const sourceTemplate = `\
|
|
400
439
|
import { defineApp } from "convex/server";
|
|
401
|
-
import auth from "@robelest/convex-auth/
|
|
440
|
+
import auth from "@robelest/convex-auth/convex.config";
|
|
402
441
|
|
|
403
442
|
const app = defineApp();
|
|
404
443
|
|
|
@@ -432,13 +471,16 @@ export default app;
|
|
|
432
471
|
async function initializeAuth(config: ProjectConfig) {
|
|
433
472
|
logStep(config, "Initialize auth file");
|
|
434
473
|
const sourceTemplate = `\
|
|
435
|
-
import { Auth } from "@robelest/convex-auth/component";
|
|
474
|
+
import { Auth, Portal } from "@robelest/convex-auth/component";
|
|
436
475
|
import { components } from "./_generated/api";
|
|
437
476
|
|
|
438
|
-
|
|
439
|
-
component: components.auth,$$
|
|
477
|
+
const auth = new Auth(components.auth, {$$
|
|
440
478
|
providers: [$$],$$
|
|
441
479
|
});
|
|
480
|
+
|
|
481
|
+
export { auth };
|
|
482
|
+
export const { signIn, signOut, store } = auth;
|
|
483
|
+
export const { portalQuery, portalMutation, portalInternal } = Portal(auth);
|
|
442
484
|
`;
|
|
443
485
|
const source = templateToSource(sourceTemplate);
|
|
444
486
|
const authPath = path.join(config.convexFolderPath, "auth");
|