@knowcode/doc-builder 1.9.1 → 1.9.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/CHANGELOG.md +29 -0
- package/CLAUDE.md +35 -0
- package/README.md +1 -0
- package/assets/css/notion-style.css +2 -2
- package/html/README.html +151 -33
- package/html/auth.js +4 -3
- package/html/css/notion-style.css +394 -13
- package/html/documentation-index.html +134 -10
- package/html/guides/authentication-default-change.html +132 -7
- package/html/guides/authentication-guide.html +143 -19
- package/html/guides/claude-workflow-guide.html +139 -22
- package/html/guides/documentation-standards.html +135 -11
- package/html/guides/html-embedding-guide.html +451 -0
- package/html/guides/image-modal-guide.html +134 -10
- package/html/guides/phosphor-icons-guide.html +152 -27
- package/html/guides/private-directory-authentication-troubleshooting.html +545 -0
- package/html/guides/private-directory-authentication.html +132 -7
- package/html/guides/public-site-deployment.html +132 -7
- package/html/guides/search-engine-verification-guide.html +132 -7
- package/html/guides/seo-guide.html +132 -7
- package/html/guides/seo-optimization-guide.html +161 -38
- package/html/guides/troubleshooting-guide.html +143 -19
- package/html/guides/windows-setup-guide.html +163 -38
- package/html/image-modal-test.html +127 -8
- package/html/index.html +151 -33
- package/html/js/auth.js +119 -39
- package/html/js/main.js +259 -25
- package/html/private/cache-control-anti-pattern.html +137 -12
- package/html/private/launch/README.html +146 -15
- package/html/private/launch/auth-cleanup-summary.html +155 -24
- package/html/private/launch/bubble-plugin-specification.html +138 -7
- package/html/private/launch/go-to-market-strategy.html +140 -9
- package/html/private/launch/launch-announcements.html +154 -24
- package/html/private/launch/vercel-deployment-auth-setup.html +140 -9
- package/html/private/next-steps-walkthrough.html +139 -14
- package/html/private/supabase-auth-implementation-completed.html +145 -21
- package/html/private/supabase-auth-implementation-plan.html +138 -14
- package/html/private/supabase-auth-integration-plan.html +144 -21
- package/html/private/supabase-auth-setup-guide.html +141 -16
- package/html/private/test-private-doc.html +132 -7
- package/html/private/user-management-tooling.html +132 -7
- package/html/prompts/markdown-document-standards.html +136 -12
- package/html/sitemap.xml +70 -46
- package/html/vercel-cli-setup-guide.html +130 -11
- package/html/vercel-first-time-setup-guide.html +127 -8
- package/lib/config.js +2 -0
- package/lib/emoji-mapper.js +2 -0
- package/lib/supabase-auth.js +4 -3
- package/package.json +1 -1
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<meta name="description" content="When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
|
|
7
|
+
<title>Private Directory Authentication Troubleshooting</title>
|
|
8
|
+
|
|
9
|
+
<meta name="author" content="Lindsay Smith">
|
|
10
|
+
<meta name="keywords" content="documentation, markdown, static site generator, vercel, notion-style, check, private">
|
|
11
|
+
<meta name="robots" content="index, follow">
|
|
12
|
+
<link rel="canonical" href="https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html">
|
|
13
|
+
|
|
14
|
+
<!-- Open Graph / Facebook -->
|
|
15
|
+
<meta property="og:type" content="article">
|
|
16
|
+
<meta property="og:url" content="https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html">
|
|
17
|
+
<meta property="og:title" content="Private Directory Authentication Troubleshooting">
|
|
18
|
+
<meta property="og:description" content="When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
|
|
19
|
+
<meta property="og:image" content="https://doc-builder-delta.vercel.app/og-default.png">
|
|
20
|
+
<meta property="og:site_name" content="@knowcode/doc-builder">
|
|
21
|
+
<meta property="og:locale" content="en_US">
|
|
22
|
+
|
|
23
|
+
<!-- Twitter Card -->
|
|
24
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
25
|
+
<meta name="twitter:site" content="@planbbackups">
|
|
26
|
+
<meta name="twitter:creator" content="@planbbackups">
|
|
27
|
+
<meta name="twitter:title" content="Private Directory Authentication Troubleshooting">
|
|
28
|
+
<meta name="twitter:description" content="When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.">
|
|
29
|
+
<meta name="twitter:image" content="https://doc-builder-delta.vercel.app/og-default.png">
|
|
30
|
+
|
|
31
|
+
<!-- Custom Meta Tags -->
|
|
32
|
+
<meta name="google-site-verification" content="FtzcDTf5BQ9K5EfnGazQkgU2U4FiN3ITzM7gHwqUAqQ">
|
|
33
|
+
<meta name="msvalidate.01" content="B2D8C4C12C530D47AA962B24CAA09630">
|
|
34
|
+
|
|
35
|
+
<!-- Fonts -->
|
|
36
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
|
|
37
|
+
|
|
38
|
+
<!-- Icons -->
|
|
39
|
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
40
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@phosphor-icons/web@2.1.1/src/regular/style.css">
|
|
41
|
+
|
|
42
|
+
<!-- Mermaid -->
|
|
43
|
+
<script src="https://cdn.jsdelivr.net/npm/mermaid@10.6.1/dist/mermaid.min.js"></script>
|
|
44
|
+
|
|
45
|
+
<!-- Styles -->
|
|
46
|
+
<link rel="stylesheet" href="/css/notion-style.css">
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<!-- Hide content until auth check -->
|
|
50
|
+
<style>
|
|
51
|
+
body {
|
|
52
|
+
visibility: hidden;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: opacity 0.3s ease;
|
|
55
|
+
}
|
|
56
|
+
body.authenticated {
|
|
57
|
+
visibility: visible;
|
|
58
|
+
opacity: 1;
|
|
59
|
+
}
|
|
60
|
+
/* Show login/logout pages immediately */
|
|
61
|
+
body.auth-page {
|
|
62
|
+
visibility: visible;
|
|
63
|
+
opacity: 1;
|
|
64
|
+
}
|
|
65
|
+
/* Style auth button consistently */
|
|
66
|
+
.auth-btn {
|
|
67
|
+
background: none;
|
|
68
|
+
border: none;
|
|
69
|
+
color: var(--text-secondary);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
padding: 0.5rem;
|
|
72
|
+
border-radius: 0.5rem;
|
|
73
|
+
transition: all 0.2s;
|
|
74
|
+
font-size: 1.1rem;
|
|
75
|
+
}
|
|
76
|
+
.auth-btn:hover {
|
|
77
|
+
background: var(--bg-secondary);
|
|
78
|
+
color: var(--text-primary);
|
|
79
|
+
}
|
|
80
|
+
</style>
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<!-- Favicon -->
|
|
84
|
+
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>✨</text></svg>">
|
|
85
|
+
|
|
86
|
+
<script type="application/ld+json">
|
|
87
|
+
{
|
|
88
|
+
"@context": "https://schema.org",
|
|
89
|
+
"@type": "TechArticle",
|
|
90
|
+
"headline": "Private Directory Authentication Troubleshooting",
|
|
91
|
+
"description": "When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.",
|
|
92
|
+
"author": {
|
|
93
|
+
"@type": "Person",
|
|
94
|
+
"name": "Lindsay Smith"
|
|
95
|
+
},
|
|
96
|
+
"publisher": {
|
|
97
|
+
"@type": "Organization",
|
|
98
|
+
"name": "Knowcode Ltd",
|
|
99
|
+
"url": "https://knowcode.tech"
|
|
100
|
+
},
|
|
101
|
+
"datePublished": "2025-07-28T16:34:27.932Z",
|
|
102
|
+
"dateModified": "2025-07-28T16:34:27.932Z",
|
|
103
|
+
"mainEntityOfPage": {
|
|
104
|
+
"@type": "WebPage",
|
|
105
|
+
"@id": "https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html"
|
|
106
|
+
},
|
|
107
|
+
"breadcrumb": {
|
|
108
|
+
"@type": "BreadcrumbList",
|
|
109
|
+
"itemListElement": [
|
|
110
|
+
{
|
|
111
|
+
"@type": "ListItem",
|
|
112
|
+
"position": 1,
|
|
113
|
+
"name": "@knowcode/doc-builder",
|
|
114
|
+
"item": "https://doc-builder-delta.vercel.app"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"@type": "ListItem",
|
|
118
|
+
"position": 2,
|
|
119
|
+
"name": "Guides",
|
|
120
|
+
"item": "https://doc-builder-delta.vercel.app/guides/"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"@type": "ListItem",
|
|
124
|
+
"position": 3,
|
|
125
|
+
"name": "Private Directory Authentication Troubleshooting",
|
|
126
|
+
"item": "https://doc-builder-delta.vercel.app/guides/private-directory-authentication-troubleshooting.html"
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</script>
|
|
132
|
+
</head>
|
|
133
|
+
<body>
|
|
134
|
+
<!-- Header -->
|
|
135
|
+
<header class="header">
|
|
136
|
+
<div class="header-content">
|
|
137
|
+
<a href="/index.html" class="logo">@knowcode/doc-builder</a>
|
|
138
|
+
|
|
139
|
+
<div class="header-actions">
|
|
140
|
+
<div class="deployment-info">
|
|
141
|
+
<span class="deployment-date" title="Built with doc-builder v1.9.3">Last updated: Jul 28, 2025, 04:34 PM UTC</span>
|
|
142
|
+
</div>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
<a href="../../login.html" class="auth-btn" title="Login/Logout">
|
|
146
|
+
<i class="fas fa-sign-in-alt"></i>
|
|
147
|
+
</a>
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
<button id="theme-toggle" class="theme-toggle" aria-label="Toggle theme">
|
|
151
|
+
<i class="fas fa-moon"></i>
|
|
152
|
+
</button>
|
|
153
|
+
|
|
154
|
+
<button id="menu-toggle" class="menu-toggle" aria-label="Toggle menu">
|
|
155
|
+
<i class="fas fa-bars"></i>
|
|
156
|
+
</button>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</header>
|
|
160
|
+
|
|
161
|
+
<!-- Preview Banner -->
|
|
162
|
+
<div id="preview-banner" class="preview-banner">
|
|
163
|
+
<div class="banner-content">
|
|
164
|
+
<i class="fas fa-exclamation-triangle banner-icon"></i>
|
|
165
|
+
<span class="banner-text">This documentation is a preview version - some content may be incomplete</span>
|
|
166
|
+
<button id="dismiss-banner" class="banner-dismiss" aria-label="Dismiss banner">
|
|
167
|
+
<i class="fas fa-times"></i>
|
|
168
|
+
</button>
|
|
169
|
+
</div>
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
<!-- Breadcrumbs -->
|
|
173
|
+
<nav class="breadcrumbs" id="breadcrumbs">
|
|
174
|
+
<!-- Breadcrumbs will be generated by JavaScript -->
|
|
175
|
+
</nav>
|
|
176
|
+
|
|
177
|
+
<!-- Main Content -->
|
|
178
|
+
<div class="main-wrapper">
|
|
179
|
+
<!-- Sidebar -->
|
|
180
|
+
<aside class="sidebar">
|
|
181
|
+
<div class="sidebar-header">
|
|
182
|
+
<div class="filter-box">
|
|
183
|
+
<input type="text" placeholder="Filter items..." class="filter-input" id="nav-filter">
|
|
184
|
+
<i class="fas fa-search filter-icon"></i>
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
<nav class="navigation">
|
|
188
|
+
|
|
189
|
+
<div class="nav-section" data-level="0">
|
|
190
|
+
<a class="nav-title" href="/README.html" >
|
|
191
|
+
<i class="fas fa-home"></i> Documentation
|
|
192
|
+
</a>
|
|
193
|
+
<div class="nav-content" >
|
|
194
|
+
<a href="/README.html" class="nav-item" data-tooltip="@knowcode/doc-builder."><i class="fas fa-file-alt"></i> Overview</a>
|
|
195
|
+
<a href="/documentation-index.html" class="nav-item" data-tooltip="This directory contains additional documentation for the @knowcode/doc-builder project, organized by topic and purpose."><i class="fas fa-file-alt"></i> Documentation Index</a>
|
|
196
|
+
<a href="/image-modal-test.html" class="nav-item" data-tooltip="This document tests the new image modal functionality in doc-builder."><i class="fas fa-file-alt"></i> Image Modal Test</a>
|
|
197
|
+
<a href="/vercel-cli-setup-guide.html" class="nav-item" data-tooltip="This guide provides comprehensive instructions for installing the Vercel CLI across different operating systems."><i class="fas fa-file-alt"></i> Vercel Cli Setup Guide</a>
|
|
198
|
+
<a href="/vercel-first-time-setup-guide.html" class="nav-item" data-tooltip="This guide walks you through the Vercel deployment process when using ."><i class="fas fa-file-alt"></i> Vercel First Time Setup Guide</a></div></div>
|
|
199
|
+
<div class="nav-section" data-level="1">
|
|
200
|
+
<a class="nav-title collapsible expanded" href="#" data-target="nav-guides-1" >
|
|
201
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Guides
|
|
202
|
+
</a>
|
|
203
|
+
<div class="nav-content" id="nav-guides-1">
|
|
204
|
+
<a href="/guides/authentication-default-change.html" class="nav-item" data-tooltip="Starting from version 1.7.4, @knowcode/doc-builder now defaults to no authentication for all documentation sites."><i class="fas fa-file-alt"></i> Authentication Default Change</a>
|
|
205
|
+
<a href="/guides/authentication-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase - a secure, scalable authentication platform."><i class="fas fa-file-alt"></i> Authentication Guide</a>
|
|
206
|
+
<a href="/guides/claude-workflow-guide.html" class="nav-item" data-tooltip="This guide demonstrates an efficient workflow for using Claude Code with a refined CLAUDE.md file to create high-quality documentation and deploy it..."><i class="fas fa-file-alt"></i> Claude Workflow Guide</a>
|
|
207
|
+
<a href="/guides/documentation-standards.html" class="nav-item" data-tooltip="This document defines the documentation standards and conventions for the @knowcode/doc-builder project."><i class="fas fa-file-alt"></i> Documentation Standards</a>
|
|
208
|
+
<a href="/guides/html-embedding-guide.html" class="nav-item" data-tooltip="Starting from version 1.9.2, doc-builder treats HTML files ( and ) as attachments that are automatically copied to your output directory during the..."><i class="fas fa-file-alt"></i> Html Embedding Guide</a>
|
|
209
|
+
<a href="/guides/image-modal-guide.html" class="nav-item" data-tooltip="When users click on any image in your generated documentation, it opens in a professional modal overlay with: Full-screen viewing experience Smooth..."><i class="fas fa-file-alt"></i> Image Modal Guide</a>
|
|
210
|
+
<a href="/guides/phosphor-icons-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder automatically converts Unicode emojis in your markdown files to beautiful Phosphor icons in the generated HTML."><i class="fas fa-file-alt"></i> Phosphor Icons Guide</a>
|
|
211
|
+
<a href="/guides/private-directory-authentication.html" class="nav-item" data-tooltip="The @knowcode/doc-builder provides flexible authentication options to protect your documentation."><i class="fas fa-file-alt"></i> Private Directory Authentication</a>
|
|
212
|
+
<a href="/guides/private-directory-authentication-troubleshooting.html" class="nav-item active" data-tooltip="Private Directory Authentication Troubleshooting."><i class="fas fa-file-alt"></i> Private Directory Authentication Troubleshooting</a>
|
|
213
|
+
<a href="/guides/public-site-deployment.html" class="nav-item" data-tooltip="The @knowcode/doc-builder now supports deploying public documentation sites without authentication."><i class="fas fa-file-alt"></i> Public Site Deployment</a>
|
|
214
|
+
<a href="/guides/search-engine-verification-guide.html" class="nav-item" data-tooltip="Search engine verification provides access to powerful webmaster tools:."><i class="fas fa-file-alt"></i> Search Engine Verification Guide</a>
|
|
215
|
+
<a href="/guides/seo-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes comprehensive SEO (Search Engine Optimization) features to help your documentation rank better in search results and..."><i class="fas fa-file-alt"></i> Seo Guide</a>
|
|
216
|
+
<a href="/guides/seo-optimization-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder includes comprehensive SEO (Search Engine Optimization) features that automatically optimize your documentation for search..."><i class="fas fa-file-alt"></i> Seo Optimization Guide</a>
|
|
217
|
+
<a href="/guides/troubleshooting-guide.html" class="nav-item" data-tooltip="This guide helps you resolve common issues when using @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Troubleshooting Guide</a>
|
|
218
|
+
<a href="/guides/windows-setup-guide.html" class="nav-item" data-tooltip="This guide helps Windows users set up the complete AI-powered documentation workflow using Claude Code, @knowcode/doc-builder, and Vercel."><i class="fas fa-file-alt"></i> Windows Setup Guide</a></div></div>
|
|
219
|
+
<div class="nav-section private-nav" data-level="1">
|
|
220
|
+
<a class="nav-title collapsible" href="#" data-target="nav-private-1" >
|
|
221
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Private
|
|
222
|
+
</a>
|
|
223
|
+
<div class="nav-content collapsed" id="nav-private-1">
|
|
224
|
+
<a href="/private/cache-control-anti-pattern.html" class="nav-item" data-tooltip="Cache Control Anti-Pattern: Why Aggressive Cache-Busting is Bad for Documentation Sites."><i class="fas fa-file-alt"></i> Cache Control Anti Pattern</a>
|
|
225
|
+
<a href="/private/next-steps-walkthrough.html" class="nav-item" data-tooltip="Now that we've implemented Supabase authentication, let's walk through testing the implementation and preparing for deployment."><i class="fas fa-file-alt"></i> Next Steps Walkthrough</a>
|
|
226
|
+
<a href="/private/supabase-auth-implementation-completed.html" class="nav-item" data-tooltip="This document records the successful implementation of Supabase authentication in @knowcode/doc-builder v1.7.5+."><i class="fas fa-file-alt"></i> Supabase Auth Implementation Completed</a>
|
|
227
|
+
<a href="/private/supabase-auth-implementation-plan.html" class="nav-item" data-tooltip="Supabase Auth Implementation Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Implementation Plan</a>
|
|
228
|
+
<a href="/private/supabase-auth-integration-plan.html" class="nav-item" data-tooltip="Supabase Authentication Integration Plan for @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Supabase Auth Integration Plan</a>
|
|
229
|
+
<a href="/private/supabase-auth-setup-guide.html" class="nav-item" data-tooltip="@knowcode/doc-builder supports enterprise-grade authentication through Supabase."><i class="fas fa-file-alt"></i> Supabase Auth Setup Guide</a>
|
|
230
|
+
<a href="/private/test-private-doc.html" class="nav-item" data-tooltip="Test Private Document."><i class="fas fa-file-alt"></i> Test Private Doc</a>
|
|
231
|
+
<a href="/private/user-management-tooling.html" class="nav-item" data-tooltip="The user management system is a set of tools designed to manage user access to Supabase-authenticated documentation sites built with."><i class="fas fa-file-alt"></i> User Management Tooling</a></div></div>
|
|
232
|
+
<div class="nav-section private-nav" data-level="2">
|
|
233
|
+
<a class="nav-title collapsible" href="/private/launch/README.html" data-target="nav-private-launch-2" >
|
|
234
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Launch
|
|
235
|
+
</a>
|
|
236
|
+
<div class="nav-content collapsed" id="nav-private-launch-2">
|
|
237
|
+
<a href="/private/launch/README.html" class="nav-item" data-tooltip="This directory contains all documentation related to the commercial launch of @knowcode/doc-builder, including go-to-market strategy, platform..."><i class="fas fa-file-alt"></i> Launch Overview</a>
|
|
238
|
+
<a href="/private/launch/auth-cleanup-summary.html" class="nav-item" data-tooltip="All references to the old client-side authentication system have been removed from @knowcode/doc-builder."><i class="fas fa-file-alt"></i> Auth Cleanup Summary</a>
|
|
239
|
+
<a href="/private/launch/bubble-plugin-specification.html" class="nav-item" data-tooltip="This document outlines the technical specification for creating a Bubble.io plugin that integrates @knowcode/doc-builder, enabling Bubble developers..."><i class="fas fa-file-alt"></i> Bubble Plugin Specification</a>
|
|
240
|
+
<a href="/private/launch/go-to-market-strategy.html" class="nav-item" data-tooltip="Go-to-Market Strategy & Product Launch Plan."><i class="fas fa-file-alt"></i> Go To Market Strategy</a>
|
|
241
|
+
<a href="/private/launch/launch-announcements.html" class="nav-item" data-tooltip="This document contains ready-to-use announcement templates for launching @knowcode/doc-builder across various platforms and channels."><i class="fas fa-file-alt"></i> Launch Announcements</a>
|
|
242
|
+
<a href="/private/launch/vercel-deployment-auth-setup.html" class="nav-item" data-tooltip="Vercel Deployment Authentication Setup Guide."><i class="fas fa-file-alt"></i> Vercel Deployment Auth Setup</a></div></div>
|
|
243
|
+
<div class="nav-section" data-level="1">
|
|
244
|
+
<a class="nav-title collapsible" href="#" data-target="nav-prompts-1" >
|
|
245
|
+
<i class="fas fa-chevron-right collapse-icon"></i><i class="fas fa-folder"></i> Prompts
|
|
246
|
+
</a>
|
|
247
|
+
<div class="nav-content collapsed" id="nav-prompts-1">
|
|
248
|
+
<a href="/prompts/markdown-document-standards.html" class="nav-item" data-tooltip="Detailed introduction to the topic..."><i class="fas fa-file-alt"></i> Markdown Document Standards</a></div></div>
|
|
249
|
+
</nav>
|
|
250
|
+
<div class="resize-handle"></div>
|
|
251
|
+
</aside>
|
|
252
|
+
|
|
253
|
+
<!-- Content Area -->
|
|
254
|
+
<main class="content">
|
|
255
|
+
<div class="content-inner">
|
|
256
|
+
<h1>Private Directory Authentication Troubleshooting</h1>
|
|
257
|
+
<p>When your private directory isn't being authentication protected after building, follow this diagnostic checklist to identify and resolve the issue.</p>
|
|
258
|
+
<h2>Quick Diagnostic Checklist</h2>
|
|
259
|
+
<h3>1. <i class="ph ph-crane" aria-label="construction"></i> Build Process Detection</h3>
|
|
260
|
+
<p><strong>Check if authentication was detected during build:</strong></p>
|
|
261
|
+
<pre><code class="language-bash">npm run build
|
|
262
|
+
</code></pre>
|
|
263
|
+
<p>Look for this message in the build output:</p>
|
|
264
|
+
<pre><code>🔐 Found private directory - automatically enabling Supabase authentication
|
|
265
|
+
Note: Grant users access by adding domain to the docbuilder_access table
|
|
266
|
+
</code></pre>
|
|
267
|
+
<p><i class="ph ph-x-circle" aria-label="error"></i> <strong>If you DON'T see this message:</strong></p>
|
|
268
|
+
<ul>
|
|
269
|
+
<li>Your <code>docs/private/</code> directory may not exist or be empty</li>
|
|
270
|
+
<li>The directory might not be properly named (check spelling/case)</li>
|
|
271
|
+
<li>The build process may not have sufficient permissions to read the directory</li>
|
|
272
|
+
</ul>
|
|
273
|
+
<h3>2. <i class="ph ph-folder" aria-label="folder"></i> Directory Structure Check</h3>
|
|
274
|
+
<p><strong>Verify your directory structure:</strong></p>
|
|
275
|
+
<pre><code class="language-bash">ls -la docs/
|
|
276
|
+
</code></pre>
|
|
277
|
+
<p>Expected structure:</p>
|
|
278
|
+
<pre><code>docs/
|
|
279
|
+
├── README.md # ✅ Public
|
|
280
|
+
├── other-docs.md # ✅ Public
|
|
281
|
+
└── private/ # 🔐 Should require auth
|
|
282
|
+
├── secret-doc.md # 🔐 Should require auth
|
|
283
|
+
└── admin/ # 🔐 Should require auth
|
|
284
|
+
└── config.md # 🔐 Should require auth
|
|
285
|
+
</code></pre>
|
|
286
|
+
<p><i class="ph ph-x-circle" aria-label="error"></i> <strong>Common issues:</strong></p>
|
|
287
|
+
<ul>
|
|
288
|
+
<li><code>Private/</code> (capital P) instead of <code>private/</code> (lowercase)</li>
|
|
289
|
+
<li>Empty <code>private/</code> directory</li>
|
|
290
|
+
<li><code>private</code> file instead of directory</li>
|
|
291
|
+
<li>Symlinks that aren't properly resolved</li>
|
|
292
|
+
</ul>
|
|
293
|
+
<h3>3. <i class="ph ph-magnifying-glass" aria-label="search"></i> Generated HTML Verification</h3>
|
|
294
|
+
<p><strong>Check if auth.js was included in your build:</strong></p>
|
|
295
|
+
<pre><code class="language-bash">ls -la html/js/auth.js
|
|
296
|
+
</code></pre>
|
|
297
|
+
<p><i class="ph ph-x-circle" aria-label="error"></i> <strong>If auth.js is missing:</strong></p>
|
|
298
|
+
<ul>
|
|
299
|
+
<li>Authentication wasn't enabled during build</li>
|
|
300
|
+
<li>Check build logs for errors</li>
|
|
301
|
+
<li>Verify <code>docs/private/</code> directory exists and contains files</li>
|
|
302
|
+
</ul>
|
|
303
|
+
<p><strong>Check if private files are being built:</strong></p>
|
|
304
|
+
<pre><code class="language-bash">ls -la html/private/
|
|
305
|
+
</code></pre>
|
|
306
|
+
<p><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Expected:</strong> Private HTML files should exist but be protected by authentication<br><i class="ph ph-x-circle" aria-label="error"></i> <strong>Problem:</strong> If private directory doesn't exist in output, files weren't processed</p>
|
|
307
|
+
<h3>4. <i class="ph ph-globe" aria-label="global"></i> Browser Testing</h3>
|
|
308
|
+
<p><strong>Test in browser (open DevTools Console):</strong></p>
|
|
309
|
+
<ol>
|
|
310
|
+
<li><strong>Visit a public page</strong> - should load normally</li>
|
|
311
|
+
<li><strong>Visit a private page directly</strong> (e.g., <code>yoursite.com/private/secret-doc.html</code>)</li>
|
|
312
|
+
<li><strong>Check console for errors:</strong></li>
|
|
313
|
+
</ol>
|
|
314
|
+
<pre><code class="language-javascript">// Should see these in console for private pages:
|
|
315
|
+
// "Checking authentication for private page..."
|
|
316
|
+
// "User not authenticated, redirecting to login"
|
|
317
|
+
</code></pre>
|
|
318
|
+
<p><i class="ph ph-x-circle" aria-label="error"></i> <strong>Common issues:</strong></p>
|
|
319
|
+
<ul>
|
|
320
|
+
<li>No console messages = auth.js not loading</li>
|
|
321
|
+
<li>JavaScript errors = Supabase connection issues</li>
|
|
322
|
+
<li>Page loads without auth = private pages not properly protected</li>
|
|
323
|
+
</ul>
|
|
324
|
+
<h3>5. <i class="ph ph-key" aria-label="key"></i> Authentication Configuration</h3>
|
|
325
|
+
<p><strong>Check Supabase connection:</strong></p>
|
|
326
|
+
<pre><code class="language-bash">grep -r "supabase" html/js/auth.js
|
|
327
|
+
</code></pre>
|
|
328
|
+
<p>Should contain:</p>
|
|
329
|
+
<ul>
|
|
330
|
+
<li>Valid Supabase URL</li>
|
|
331
|
+
<li>Valid anonymous key</li>
|
|
332
|
+
<li>Domain checking logic</li>
|
|
333
|
+
</ul>
|
|
334
|
+
<p><i class="ph ph-x-circle" aria-label="error"></i> <strong>Red flags:</strong></p>
|
|
335
|
+
<ul>
|
|
336
|
+
<li>Missing Supabase credentials</li>
|
|
337
|
+
<li>Localhost-only configuration in production</li>
|
|
338
|
+
<li>Network errors to Supabase</li>
|
|
339
|
+
</ul>
|
|
340
|
+
<h2>Common Problems & Solutions</h2>
|
|
341
|
+
<h3>Problem 1: "Build shows no private directory detection"</h3>
|
|
342
|
+
<p><strong>Cause:</strong> Directory structure issue</p>
|
|
343
|
+
<p><strong>Solutions:</strong></p>
|
|
344
|
+
<pre><code class="language-bash"># Check if directory exists and has content
|
|
345
|
+
ls -la docs/private/
|
|
346
|
+
find docs/private/ -name "*.md" -type f
|
|
347
|
+
|
|
348
|
+
# Create proper structure if missing
|
|
349
|
+
mkdir -p docs/private
|
|
350
|
+
echo "# Private Document" > docs/private/test.md
|
|
351
|
+
|
|
352
|
+
# Rebuild
|
|
353
|
+
npm run build
|
|
354
|
+
</code></pre>
|
|
355
|
+
<h3>Problem 2: "Private pages load without authentication"</h3>
|
|
356
|
+
<p><strong>Cause:</strong> Authentication JavaScript not loading or functioning</p>
|
|
357
|
+
<p><strong>Debug steps:</strong></p>
|
|
358
|
+
<ol>
|
|
359
|
+
<li><strong>Check if auth.js exists:</strong> <code>ls html/js/auth.js</code></li>
|
|
360
|
+
<li><strong>Check browser DevTools Network tab</strong> - is auth.js loading?</li>
|
|
361
|
+
<li><strong>Check browser Console</strong> - any JavaScript errors?</li>
|
|
362
|
+
<li><strong>Verify URL pattern</strong> - does your private URL include <code>/private/</code>?</li>
|
|
363
|
+
</ol>
|
|
364
|
+
<p><strong>Solutions:</strong></p>
|
|
365
|
+
<pre><code class="language-bash"># Force rebuild with verbose output
|
|
366
|
+
npm run build -- --verbose
|
|
367
|
+
|
|
368
|
+
# Check generated auth.js for errors
|
|
369
|
+
cat html/js/auth.js | head -20
|
|
370
|
+
</code></pre>
|
|
371
|
+
<h3>Problem 3: "Authentication works locally but not in production"</h3>
|
|
372
|
+
<p><strong>Cause:</strong> Domain-based access control issue</p>
|
|
373
|
+
<p><strong>Debug steps:</strong></p>
|
|
374
|
+
<ol>
|
|
375
|
+
<li><strong>Check your domain in database:</strong></li>
|
|
376
|
+
</ol>
|
|
377
|
+
<pre><code class="language-sql">SELECT * FROM docbuilder_access WHERE domain = 'yourdomain.com';
|
|
378
|
+
</code></pre>
|
|
379
|
+
<ol start="2">
|
|
380
|
+
<li><strong>Verify user access:</strong></li>
|
|
381
|
+
</ol>
|
|
382
|
+
<pre><code class="language-sql">SELECT u.email, da.domain
|
|
383
|
+
FROM auth.users u
|
|
384
|
+
JOIN docbuilder_access da ON u.id = da.user_id
|
|
385
|
+
WHERE da.domain = 'yourdomain.com';
|
|
386
|
+
</code></pre>
|
|
387
|
+
<p><strong>Solutions:</strong></p>
|
|
388
|
+
<pre><code class="language-sql">-- Add your production domain
|
|
389
|
+
INSERT INTO docbuilder_access (user_id, domain)
|
|
390
|
+
VALUES ('your-user-uuid', 'yourdomain.com');
|
|
391
|
+
|
|
392
|
+
-- Add common domain variations
|
|
393
|
+
INSERT INTO docbuilder_access (user_id, domain) VALUES
|
|
394
|
+
('your-user-uuid', 'yourdomain.com'),
|
|
395
|
+
('your-user-uuid', 'www.yourdomain.com'),
|
|
396
|
+
('your-user-uuid', 'docs.yourdomain.com');
|
|
397
|
+
</code></pre>
|
|
398
|
+
<h3>Problem 4: "Users can't login"</h3>
|
|
399
|
+
<p><strong>Cause:</strong> User access not granted in database</p>
|
|
400
|
+
<p><strong>Debug steps:</strong></p>
|
|
401
|
+
<ol>
|
|
402
|
+
<li><strong>Check user exists in Supabase Auth dashboard</strong></li>
|
|
403
|
+
<li><strong>Verify user has domain access in <code>docbuilder_access</code> table</strong></li>
|
|
404
|
+
<li><strong>Check domain matches exactly (case-sensitive)</strong></li>
|
|
405
|
+
</ol>
|
|
406
|
+
<p><strong>Solutions:</strong></p>
|
|
407
|
+
<pre><code class="language-sql">-- Find user ID from email
|
|
408
|
+
SELECT id, email FROM auth.users WHERE email = 'user@example.com';
|
|
409
|
+
|
|
410
|
+
-- Grant access using the user ID
|
|
411
|
+
INSERT INTO docbuilder_access (user_id, domain)
|
|
412
|
+
VALUES ('uuid-from-above', 'yourdomain.com');
|
|
413
|
+
</code></pre>
|
|
414
|
+
<h2>Step-by-Step Diagnosis</h2>
|
|
415
|
+
<h3>Step 1: Verify Build Configuration</h3>
|
|
416
|
+
<pre><code class="language-bash"># 1. Check your project structure
|
|
417
|
+
tree docs/ -I node_modules
|
|
418
|
+
|
|
419
|
+
# 2. Look for config overrides
|
|
420
|
+
cat doc-builder.config.js 2>/dev/null || echo "No config file"
|
|
421
|
+
|
|
422
|
+
# 3. Clean build
|
|
423
|
+
rm -rf html/
|
|
424
|
+
npm run build
|
|
425
|
+
|
|
426
|
+
# 4. Verify authentication files were created
|
|
427
|
+
ls -la html/js/auth.js html/login.html html/logout.html
|
|
428
|
+
</code></pre>
|
|
429
|
+
<h3>Step 2: Test Authentication Flow</h3>
|
|
430
|
+
<pre><code class="language-bash"># 1. Start local server
|
|
431
|
+
cd html/
|
|
432
|
+
python3 -m http.server 8000
|
|
433
|
+
|
|
434
|
+
# 2. Open browser to http://localhost:8000
|
|
435
|
+
# 3. Navigate to a private page URL
|
|
436
|
+
# 4. Check if redirected to login
|
|
437
|
+
</code></pre>
|
|
438
|
+
<h3>Step 3: Database Verification</h3>
|
|
439
|
+
<pre><code class="language-sql">-- Connect to your Supabase database and run:
|
|
440
|
+
|
|
441
|
+
-- 1. Check table exists
|
|
442
|
+
\dt docbuilder_access
|
|
443
|
+
|
|
444
|
+
-- 2. Check your domain entries
|
|
445
|
+
SELECT domain, COUNT(*) as user_count
|
|
446
|
+
FROM docbuilder_access
|
|
447
|
+
GROUP BY domain;
|
|
448
|
+
|
|
449
|
+
-- 3. Check specific user access
|
|
450
|
+
SELECT u.email, da.domain
|
|
451
|
+
FROM auth.users u
|
|
452
|
+
JOIN docbuilder_access da ON u.id = da.user_id
|
|
453
|
+
WHERE u.email = 'your-email@example.com';
|
|
454
|
+
</code></pre>
|
|
455
|
+
<h2>Emergency Fixes</h2>
|
|
456
|
+
<h3>Quick Fix 1: Force Authentication On</h3>
|
|
457
|
+
<p>Add to your <code>doc-builder.config.js</code>:</p>
|
|
458
|
+
<pre><code class="language-javascript">module.exports = {
|
|
459
|
+
features: {
|
|
460
|
+
authentication: 'supabase' // Forces entire site to require auth
|
|
461
|
+
}
|
|
462
|
+
};
|
|
463
|
+
</code></pre>
|
|
464
|
+
<h3>Quick Fix 2: Manual Auth.js Check</h3>
|
|
465
|
+
<p>Verify authentication script is working:</p>
|
|
466
|
+
<pre><code class="language-javascript">// Add to browser console on private page:
|
|
467
|
+
if (typeof supabase !== 'undefined') {
|
|
468
|
+
console.log('✅ Supabase loaded');
|
|
469
|
+
} else {
|
|
470
|
+
console.log('❌ Supabase not loaded - check auth.js');
|
|
471
|
+
}
|
|
472
|
+
</code></pre>
|
|
473
|
+
<h3>Quick Fix 3: Bypass for Testing</h3>
|
|
474
|
+
<p><strong><i class="ph ph-warning-circle" aria-label="warning"></i> TEMPORARY ONLY - DO NOT USE IN PRODUCTION</strong></p>
|
|
475
|
+
<pre><code class="language-javascript">// Add to html/js/auth.js for testing (REMOVE AFTER TESTING):
|
|
476
|
+
// document.body.classList.add('authenticated');
|
|
477
|
+
// console.log('🚨 BYPASSING AUTH - REMOVE THIS');
|
|
478
|
+
</code></pre>
|
|
479
|
+
<h2>Prevention Checklist</h2>
|
|
480
|
+
<p><i class="ph ph-check-circle" aria-label="checked"></i> <strong>Before deploying:</strong></p>
|
|
481
|
+
<ul>
|
|
482
|
+
<li><input disabled="" type="checkbox"> <code>docs/private/</code> directory exists and contains files</li>
|
|
483
|
+
<li><input disabled="" type="checkbox"> Build logs show "Found private directory" message </li>
|
|
484
|
+
<li><input disabled="" type="checkbox"> <code>html/js/auth.js</code> file exists after build</li>
|
|
485
|
+
<li><input disabled="" type="checkbox"> Users added to <code>docbuilder_access</code> table with correct domain</li>
|
|
486
|
+
<li><input disabled="" type="checkbox"> Tested authentication flow on staging/local environment</li>
|
|
487
|
+
<li><input disabled="" type="checkbox"> Verified private pages redirect to login when not authenticated</li>
|
|
488
|
+
<li><input disabled="" type="checkbox"> Confirmed authenticated users can access private content</li>
|
|
489
|
+
</ul>
|
|
490
|
+
<p><i class="ph ph-check-circle" aria-label="checked"></i> <strong>After deploying:</strong></p>
|
|
491
|
+
<ul>
|
|
492
|
+
<li><input disabled="" type="checkbox"> Test private page access in incognito browser</li>
|
|
493
|
+
<li><input disabled="" type="checkbox"> Verify login/logout flow works</li>
|
|
494
|
+
<li><input disabled="" type="checkbox"> Check browser DevTools for JavaScript errors</li>
|
|
495
|
+
<li><input disabled="" type="checkbox"> Confirm domain matches database entries exactly</li>
|
|
496
|
+
</ul>
|
|
497
|
+
<h2>Getting Help</h2>
|
|
498
|
+
<p>If authentication still isn't working after following this guide:</p>
|
|
499
|
+
<ol>
|
|
500
|
+
<li><p><strong>Gather debug info:</strong></p>
|
|
501
|
+
<ul>
|
|
502
|
+
<li>Build output logs</li>
|
|
503
|
+
<li>Browser DevTools Console errors</li>
|
|
504
|
+
<li>Network tab showing failed requests</li>
|
|
505
|
+
<li>Your domain name and directory structure</li>
|
|
506
|
+
</ul>
|
|
507
|
+
</li>
|
|
508
|
+
<li><p><strong>Check common scenarios:</strong></p>
|
|
509
|
+
<ul>
|
|
510
|
+
<li>Does it work locally but not in production?</li>
|
|
511
|
+
<li>Does the login page appear but login fails?</li>
|
|
512
|
+
<li>Are private pages completely public?</li>
|
|
513
|
+
<li>Do you see JavaScript errors?</li>
|
|
514
|
+
</ul>
|
|
515
|
+
</li>
|
|
516
|
+
<li><p><strong>Verify requirements:</strong></p>
|
|
517
|
+
<ul>
|
|
518
|
+
<li>Supabase project is accessible</li>
|
|
519
|
+
<li>Database table <code>docbuilder_access</code> exists</li>
|
|
520
|
+
<li>User accounts exist in Supabase Auth</li>
|
|
521
|
+
<li>Domain entries match your deployment URL exactly</li>
|
|
522
|
+
</ul>
|
|
523
|
+
</li>
|
|
524
|
+
</ol>
|
|
525
|
+
<p>The authentication system is designed to "fail secure" - if there are any doubts about configuration, it should redirect to login rather than expose private content.</p>
|
|
526
|
+
|
|
527
|
+
</div>
|
|
528
|
+
</main>
|
|
529
|
+
</div>
|
|
530
|
+
|
|
531
|
+
<!-- Scripts -->
|
|
532
|
+
<script>
|
|
533
|
+
// Pass configuration to frontend
|
|
534
|
+
window.docBuilderConfig = {
|
|
535
|
+
features: {
|
|
536
|
+
showPdfDownload: true,
|
|
537
|
+
menuDefaultOpen: false
|
|
538
|
+
}
|
|
539
|
+
};
|
|
540
|
+
</script>
|
|
541
|
+
<script src="/js/main.js"></script>
|
|
542
|
+
<script src="https://unpkg.com/@supabase/supabase-js@2"></script>
|
|
543
|
+
<script src="/js/auth.js"></script>
|
|
544
|
+
</body>
|
|
545
|
+
</html>
|