create-githat-app 1.8.2 → 1.8.3
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 +2 -2
- package/package.json +1 -1
- package/templates/agent/app/account/security/page.tsx.hbs +32 -0
- package/templates/base/README.md.hbs +11 -0
- package/templates/base/githat/dashboard/layout.tsx.hbs +1 -0
- package/templates/classroom/app/account/security/page.tsx.hbs +32 -0
- package/templates/content/app/account/security/page.tsx.hbs +32 -0
- package/templates/dashboard/app/account/security/page.tsx.hbs +32 -0
- package/templates/marketplace/app/account/security/page.tsx.hbs +32 -0
- package/templates/nextjs/app/account/security/page.tsx.hbs +32 -0
- package/templates/plain/app/account/security/page.tsx.hbs +32 -0
- package/templates/portfolio/app/account/security/page.tsx.hbs +32 -0
- package/templates/saas/app/account/security/page.tsx.hbs +32 -0
- package/templates/saas/app/admin/page.tsx.hbs +4 -3
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.
|
|
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.
|
|
39
|
+
"@githat/nextjs": "^0.13.0",
|
|
40
40
|
"@githat/ui": "^1.0.0"
|
|
41
41
|
},
|
|
42
42
|
devDependencies: {
|
package/package.json
CHANGED
|
@@ -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,17 @@ 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
|
+
|
|
103
114
|
## Learn More
|
|
104
115
|
|
|
105
116
|
- [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,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,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,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,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,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,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,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,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"
|
|
53
|
-
<AdminLink href="/admin/billing"
|
|
54
|
-
<AdminLink href="/admin/settings"
|
|
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>
|