@nextsparkjs/theme-default 0.1.0-beta.148 → 0.1.0-beta.150

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.
@@ -53,6 +53,21 @@ export const APP_CONFIG_OVERRIDES = {
53
53
  enabled: true,
54
54
  },
55
55
  },
56
+ /**
57
+ * Whether Better Auth automatically sends the verification email on signup.
58
+ *
59
+ * - `true` (default): users get a "Verify Your Email Address" link email
60
+ * immediately when they sign up via `/api/auth/sign-up/email`.
61
+ * - `false`: suppress the automatic email. Use this when your project
62
+ * verifies email ownership through other means (OTP code, invitation
63
+ * token, claim-account flow). The `sendVerificationEmail` function
64
+ * remains available — you can still trigger link-based verification
65
+ * explicitly when you need to.
66
+ *
67
+ * `requireEmailVerification: true` is enforced regardless: users with
68
+ * `emailVerified: false` cannot sign in.
69
+ */
70
+ sendVerificationEmailOnSignup: true,
56
71
  },
57
72
 
58
73
  // =============================================================================
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Default theme override: Verify Email.
3
+ *
4
+ * This file overrides core's default `verify-email` template when the active
5
+ * theme is `default`. It exists primarily as a working demo of the override
6
+ * convention — drop a sibling file (e.g. `reset-password.ts`,
7
+ * `otp-verification.ts`, `team-invitation.ts`, or any new slug like
8
+ * `welcome.ts`) and rebuild the registry to override or add templates.
9
+ *
10
+ * The visible-but-small customization here is the subject prefix
11
+ * "[default theme] " — enough to distinguish this output from core's default
12
+ * during end-to-end verification, while keeping the body identical.
13
+ *
14
+ * To remove the override and fall back to core's default: delete this file
15
+ * and rebuild the registry.
16
+ */
17
+
18
+ import coreVerifyEmail from '@nextsparkjs/core/emails/verify-email'
19
+ import type {
20
+ EmailContent,
21
+ VerificationEmailData,
22
+ } from '@nextsparkjs/core/lib/email/types'
23
+
24
+ export default async function verifyEmail(
25
+ data: VerificationEmailData,
26
+ locale?: string,
27
+ ): Promise<EmailContent> {
28
+ const result = await coreVerifyEmail(data, locale)
29
+ return {
30
+ ...result,
31
+ subject: `[default theme] ${result.subject}`,
32
+ }
33
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextsparkjs/theme-default",
3
- "version": "0.1.0-beta.148",
3
+ "version": "0.1.0-beta.150",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./config/theme.config.ts",