Skip to content

Commit 768171f

Browse files
authored
Merge pull request #1520 from Abhash-Chakraborty/Abhash/issue-322-clerk-auth
fix: replace broken GitHub login with Clerk auth
2 parents 20c24f3 + 4bcbcf2 commit 768171f

19 files changed

Lines changed: 468 additions & 1355 deletions

.env.example

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ ALGOLIA_INDEX_NAME=your_algolia_index_name
2323
SHOPIFY_STORE_DOMAIN=your-store.myshopify.com
2424
SHOPIFY_STOREFRONT_ACCESS_TOKEN=your_storefront_access_token_here
2525

26-
# Firebase Configuration (if needed)
27-
# FIREBASE_API_KEY=your_firebase_api_key
28-
# FIREBASE_AUTH_DOMAIN=your_firebase_auth_domain
29-
# FIREBASE_PROJECT_ID=your_firebase_project_id
26+
# Clerk Authentication Configuration
27+
# Browser-safe publishable key used by the frontend
28+
VITE_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key_here
29+
# Server-side secret key used by Clerk tooling only. Do not expose this in browser code.
30+
CLERK_SECRET_KEY=your_clerk_secret_key_here
3031

3132
# EmailJS Configuration (for Contact Us page)
3233
# Sign up at https://www.emailjs.com and create a service + template

docusaurus.config.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import type { Config } from "@docusaurus/types";
33
import type * as Preset from "@docusaurus/preset-classic";
44
import * as dotenv from "dotenv";
55
import giscusInjector from "./src/plugins/giscus-injector";
6+
dotenv.config({ path: ".env.local" });
67
dotenv.config();
78

89
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
@@ -38,7 +39,7 @@ const config: Config = {
3839

3940
onBrokenLinks: "throw",
4041
// onBrokenMarkdownLinks moved to markdown.hooks
41-
42+
4243
// Google Analytics and Theme Scripts
4344
scripts: [
4445
{
@@ -247,7 +248,7 @@ const config: Config = {
247248
{
248249
type: "html",
249250
position: "right",
250-
value: '<div id="firebase-auth-github-navbar"></div>',
251+
value: '<div id="clerk-auth-navbar"></div>',
251252
},
252253
],
253254
},
@@ -286,6 +287,7 @@ const config: Config = {
286287
// ✅ Add this customFields object to expose the token to the client-side
287288
customFields: {
288289
gitToken: process.env.DOCUSAURUS_GIT_TOKEN,
290+
clerkPublishableKey: process.env.VITE_CLERK_PUBLISHABLE_KEY || "",
289291
// Shopify credentials for merch store
290292
SHOPIFY_STORE_DOMAIN:
291293
process.env.SHOPIFY_STORE_DOMAIN || "junh9v-gw.myshopify.com",
@@ -298,10 +300,10 @@ const config: Config = {
298300
EMAILJS_TEMPLATE_ID: process.env.EMAILJS_TEMPLATE_ID || "",
299301
algoliaSiteSearch: hasAlgoliaSiteSearch
300302
? {
301-
applicationId: algoliaAppId,
302-
apiKey: algoliaSearchApiKey,
303-
indexName: algoliaIndexName,
304-
}
303+
applicationId: algoliaAppId,
304+
apiKey: algoliaSearchApiKey,
305+
indexName: algoliaIndexName,
306+
}
305307
: null,
306308
hooks: {
307309
onBrokenMarkdownLinks: "warn",

0 commit comments

Comments
 (0)