create-githat-app 1.8.2 → 1.8.5

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/cli.js CHANGED
@@ -21,7 +21,7 @@ var DEPS = {
21
21
  next: "^16.0.0",
22
22
  react: "^19.0.0",
23
23
  "react-dom": "^19.0.0",
24
- "@githat/nextjs": "^0.12.0",
24
+ "@githat/nextjs": "^0.13.0",
25
25
  "@githat/ui": "^1.0.0"
26
26
  },
27
27
  devDependencies: {
@@ -36,7 +36,7 @@ var DEPS = {
36
36
  react: "^19.0.0",
37
37
  "react-dom": "^19.0.0",
38
38
  "react-router-dom": "^7.0.0",
39
- "@githat/nextjs": "^0.12.0",
39
+ "@githat/nextjs": "^0.13.0",
40
40
  "@githat/ui": "^1.0.0"
41
41
  },
42
42
  devDependencies: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-githat-app",
3
- "version": "1.8.2",
3
+ "version": "1.8.5",
4
4
  "description": "GitHat CLI — scaffold apps and manage the skills marketplace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -100,6 +100,43 @@ const domains = await list(); // includes verificationStatus
100
100
  Once verified, links in emails point to `https://{{domain}}/reset-password?token=…`
101
101
  — users never see githat.io.
102
102
 
103
+ ## Two-factor authentication
104
+
105
+ Users can enable TOTP-based 2FA at `/account/security` (the page is
106
+ scaffolded for you). After enrollment, sign-in flows automatically
107
+ gate behind a 6-digit code from any authenticator app (1Password,
108
+ Authy, Google Authenticator, etc.). Recovery codes are generated
109
+ once at enrollment for account recovery.
110
+
111
+ `<SignInForm/>` and `<MfaChallenge/>` from `@githat/nextjs` handle
112
+ the entire flow end-to-end — no integration code needed.
113
+
114
+ ## Magic-link sign-in (passwordless)
115
+
116
+ `<SignInForm/>` exposes a "Use a magic link instead" toggle. Users
117
+ type their email, get a one-time link, and sign in without a password.
118
+ The route at `/sign-in/magic` is scaffolded for you and renders
119
+ `<MagicLinkVerify/>`, which handles the token verification and
120
+ MFA-challenge handoff automatically.
121
+
122
+ Magic-link emails ship from the same per-app branded sender as
123
+ password-reset emails (verify your domain at `/account/security`
124
+ or via `useEmailDomains()` to upgrade from `auth@githat.io` to
125
+ `auth@yourdomain`).
126
+
127
+ ## Passkey sign-in (Face ID, Touch ID, hardware keys)
128
+
129
+ `<SignInForm/>` automatically shows a passkey button when the
130
+ browser supports WebAuthn. Users can register a passkey from
131
+ `/account/security` (in `<MfaManager/>`'s "Your passkeys" section).
132
+ Once registered, sign-in is one click + biometric — no email,
133
+ no password, no codes.
134
+
135
+ Passkeys are origin-bound to your domain — they only work on
136
+ your site, never elsewhere, even if a user has the same passkey
137
+ "saved" in their password manager. This is the correct security
138
+ model.
139
+
103
140
  ## Learn More
104
141
 
105
142
  - [GitHat Documentation](https://githat.io/docs)
@@ -24,6 +24,7 @@ const navItems = [
24
24
  {{#if includeAgentModule}}
25
25
  { label: 'AI Agents', href: '/dashboard/agents' },
26
26
  {{/if}}
27
+ { label: 'Security', href: '/account/security' },
27
28
  ];
28
29
 
29
30
  export function DashboardLayout({ children }{{#if typescript}}: { children: React.ReactNode }{{/if}}) {
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+ import { Suspense } from 'react';
3
+ import { MagicLinkVerify } from '@githat/nextjs';
4
+
5
+ export default function MagicLinkPage() {
6
+ return (
7
+ <Suspense fallback={null}>
8
+ <MagicLinkVerify />
9
+ </Suspense>
10
+ );
11
+ }
@@ -0,0 +1,32 @@
1
+ 'use client';
2
+
3
+ import { MfaManager } from '@githat/nextjs';
4
+
5
+ /**
6
+ * /account/security — TOTP 2FA management for {{businessName}}.
7
+ *
8
+ * The <MfaManager/> component reads the current user's mfaEnabled flag
9
+ * and renders either an "Enable 2FA" CTA or the disable / regenerate-
10
+ * recovery-codes controls. All flows are gated behind the GitHat API
11
+ * (api.githat.io) — no integration code lives in this scaffold.
12
+ */
13
+ export default function SecurityPage() {
14
+ return (
15
+ <main
16
+ style=\{{
17
+ maxWidth: '640px',
18
+ margin: '0 auto',
19
+ padding: 'var(--space-8, 2rem) var(--space-4, 1rem)',
20
+ color: 'var(--fg, #111)',
21
+ }}
22
+ >
23
+ <header style=\{{ marginBottom: '1.5rem' }}>
24
+ <h1 style=\{{ fontSize: '1.875rem', fontWeight: 700, margin: 0 }}>Security</h1>
25
+ <p style=\{{ color: 'var(--fg-muted, #666)', marginTop: '0.25rem' }}>
26
+ Manage two-factor authentication for your {{businessName}} account.
27
+ </p>
28
+ </header>
29
+ <MfaManager />
30
+ </main>
31
+ );
32
+ }
@@ -49,9 +49,10 @@ export default function AdminPage() {
49
49
  gridTemplateColumns: 'repeat(auto-fit, minmax(220px, 1fr))',
50
50
  gap: 'var(--space-3)',
51
51
  }}>
52
- <AdminLink href="/admin/team" title="Team" hint="Invite members, set roles" />
53
- <AdminLink href="/admin/billing" title="Billing" hint="Subscription, invoices, payment method" />
54
- <AdminLink href="/admin/settings" title="Settings" hint="Org name, custom domain, branding" />
52
+ <AdminLink href="/admin/team" title="Team" hint="Invite members, set roles" />
53
+ <AdminLink href="/admin/billing" title="Billing" hint="Subscription, invoices, payment method" />
54
+ <AdminLink href="/admin/settings" title="Settings" hint="Org name, custom domain, branding" />
55
+ <AdminLink href="/account/security" title="Security" hint="Two-factor auth, recovery codes" />
55
56
  </nav>
56
57
  </div>
57
58
  </div>