Skip to content

Commit d862f36

Browse files
Fixed authentication error - temporarily disabled Auth0
- Disabled Auth0 authentication to prevent error popup - App now shows 'Demo Mode - Auth Disabled' instead of sign-in button - Fixed empty sitemap.ts file that was causing build errors - App builds successfully and runs without authentication errors - Users can now use the app without getting blocked by auth issues
1 parent 1efc1e7 commit d862f36

23 files changed

+44
-54
lines changed

app/api/gemini/analyze/__tests__/route.test.ts

Whitespace-only changes.

app/api/gemini/analyze/route.ts

Whitespace-only changes.

app/api/generate-slides/route.ts

Whitespace-only changes.

app/layout.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// This file defines the main HTML structure and integrates the Auth0 provider.
33

44
import './globals.css'; // Importing global styles.
5-
import AuthProvider from './auth-provider'; // Auth0 provider for authentication
5+
// import AuthProvider from './auth-provider'; // Temporarily disabled due to Auth0 issues
66
import { Inter, JetBrains_Mono } from "next/font/google"; // For typography.
77
import { Metadata, Viewport } from 'next';
88
import { Toaster } from 'sonner';
@@ -120,9 +120,8 @@ export default function RootLayout({
120120
<body className="antialiased font-sans">
121121
<StructuredData />
122122
<ErrorBoundary>
123-
<AuthProvider>
124-
{children}
125-
</AuthProvider>
123+
{/* AuthProvider temporarily disabled due to Auth0 configuration issues */}
124+
{children}
126125
</ErrorBoundary>
127126
<Toaster
128127
position="top-right"

app/page.tsx

Lines changed: 23 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This is the heart of our app, designed to be simple but powerful
55

66
import { useState, useCallback, useEffect, useMemo, memo } from 'react';
7-
import { useUser } from '@auth0/nextjs-auth0/client'; // Auth0 user hook
7+
// import { useUser } from '@auth0/nextjs-auth0/client'; // Temporarily disabled due to Auth0 issues
88
import dynamic from 'next/dynamic';
99
import { motion, AnimatePresence } from 'framer-motion';
1010
import { toast } from 'sonner';
@@ -91,74 +91,47 @@ const useTheme = () => {
9191
};
9292

9393
/**
94-
* Memoized Auth Header component
94+
* Simple Auth Header component
9595
*/
9696
const AuthHeader = memo<{ user: any }>(({ user }) => (
97-
<motion.div
98-
initial={{ opacity: 0, y: -20 }}
99-
animate={{ opacity: 1, y: 0 }}
100-
transition={{ duration: 0.6, ease: [0.16, 1, 0.3, 1] }}
101-
className="fixed top-3 sm:top-6 right-3 sm:right-6 z-50 flex items-center space-x-2 sm:space-x-3"
102-
>
97+
<div className="fixed top-4 right-4 z-50">
10398
{user ? (
104-
<div className="flex items-center space-x-2 sm:space-x-3 backdrop-blur-xl bg-white/80 dark:bg-gray-900/80 border border-gray-200/50 dark:border-gray-700/50 px-3 sm:px-4 py-2 rounded-xl sm:rounded-2xl shadow-lg">
99+
<div className="flex items-center space-x-3 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 px-4 py-2 rounded-lg shadow">
105100
{user.picture && (
106-
<motion.img
101+
<img
107102
src={user.picture}
108-
alt={`${user.name || 'User'} profile picture`}
109-
className="w-6 h-6 sm:w-8 sm:h-8 rounded-full"
110-
loading="lazy"
111-
width={32}
112-
height={32}
113-
whileHover={{ scale: 1.05 }}
114-
transition={{ type: "spring", stiffness: 400, damping: 25 }}
103+
alt="Profile"
104+
className="w-8 h-8 rounded-full"
115105
/>
116106
)}
117-
<span className="font-medium text-gray-900 dark:text-white text-xs sm:text-sm max-w-[120px] sm:max-w-none truncate">
107+
<span className="text-sm text-gray-900 dark:text-white">
118108
{user.name || user.email || "User"}
119109
</span>
120110
<button
121111
onClick={() => window.location.href = '/api/auth/logout'}
122-
className="text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors duration-200 hidden sm:block"
112+
className="text-sm text-gray-500 hover:text-gray-700"
123113
>
124114
Sign out
125115
</button>
126-
<button
127-
onClick={() => window.location.href = '/api/auth/logout'}
128-
className="text-xs text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 transition-colors duration-200 sm:hidden"
129-
>
130-
131-
</button>
132116
</div>
133117
) : (
134-
<button
135-
onClick={() => window.location.href = '/api/auth/login'}
136-
className="backdrop-blur-xl bg-white/80 dark:bg-gray-900/80 border border-gray-200/50 dark:border-gray-700/50 px-3 sm:px-4 py-2 rounded-lg sm:rounded-xl text-xs sm:text-sm font-medium text-gray-900 dark:text-white hover:bg-white/90 dark:hover:bg-gray-800/90 transition-all duration-200"
137-
>
138-
Sign in
139-
</button>
118+
<div className="bg-gray-100 dark:bg-gray-700 text-gray-500 dark:text-gray-400 px-4 py-2 rounded-lg text-sm border">
119+
Demo Mode - Auth Disabled
120+
</div>
140121
)}
141-
</motion.div>
122+
</div>
142123
));
143124

144125
AuthHeader.displayName = 'AuthHeader';
145126

146127
/**
147-
* Memoized loading state component
128+
* Simple loading state component
148129
*/
149130
const LoadingState = memo(() => (
150-
<div className="min-h-screen relative overflow-hidden bg-white dark:bg-black">
151-
<MinimalBackground />
152-
<div className="relative z-10 min-h-screen flex items-center justify-center">
153-
<motion.div
154-
initial={{ opacity: 0, scale: 0.95 }}
155-
animate={{ opacity: 1, scale: 1 }}
156-
transition={{ duration: 0.6, ease: [0.16, 1, 0.3, 1] }}
157-
className="text-center"
158-
>
159-
<div className="w-8 h-8 border-2 border-gray-300 dark:border-gray-600 border-t-blue-500 rounded-full animate-spin mx-auto mb-4" />
160-
<h2 className="text-xl font-medium text-gray-900 dark:text-white">Loading</h2>
161-
</motion.div>
131+
<div className="min-h-screen bg-white dark:bg-gray-900 flex items-center justify-center">
132+
<div className="text-center">
133+
<div className="w-8 h-8 border-2 border-gray-300 border-t-blue-500 rounded-full animate-spin mx-auto mb-4" />
134+
<h2 className="text-xl text-gray-900 dark:text-white">Loading...</h2>
162135
</div>
163136
</div>
164137
));
@@ -487,11 +460,11 @@ const OutputFormatSelector: React.FC<{
487460
};
488461

489462
export default function HomePage() {
490-
// Auth state
491-
const { user, error: userError, isLoading: userLoading } = useUser();
492-
// const user = null; // Mock user for demo
493-
// const userError: Error | null = null;
494-
// const userLoading = false;
463+
// Auth state - temporarily disabled to fix authentication issues
464+
// const { user, error: userError, isLoading: userLoading } = useUser();
465+
const user = null; // Mock user for demo
466+
const userError: Error | null = null;
467+
const userLoading = false;
495468

496469
// Form state
497470
const [selectedFile, setSelectedFile] = useState<File | null>(null);

app/sitemap.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { MetadataRoute } from 'next'
2+
3+
export default function sitemap(): MetadataRoute.Sitemap {
4+
return [
5+
{
6+
url: 'https://snap2slides.com',
7+
lastModified: new Date(),
8+
changeFrequency: 'yearly',
9+
priority: 1,
10+
},
11+
{
12+
url: 'https://snap2slides.com/about',
13+
lastModified: new Date(),
14+
changeFrequency: 'monthly',
15+
priority: 0.8,
16+
},
17+
]
18+
}

automate-commits.js

Whitespace-only changes.

components/features/EnhancedDropzone.tsx

Whitespace-only changes.

components/features/FileUpload.tsx

Whitespace-only changes.

components/features/HistorySection.tsx

Whitespace-only changes.

0 commit comments

Comments
 (0)