@@ -91,9 +91,9 @@ const useTheme = () => {
9191} ;
9292
9393/**
94- * Simple Auth Header component with bypass support
94+ * Simple Auth Header component
9595 */
96- const AuthHeader = memo < { user : any ; authBypass : boolean ; onBypass : ( ) => void } > ( ( { user, authBypass , onBypass } ) => (
96+ const AuthHeader = memo < { user : any } > ( ( { user } ) => (
9797 < div className = "fixed top-4 right-4 z-50" >
9898 { user ? (
9999 < 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" >
@@ -114,29 +114,13 @@ const AuthHeader = memo<{ user: any; authBypass: boolean; onBypass: () => void }
114114 Sign out
115115 </ button >
116116 </ div >
117- ) : authBypass ? (
118- < div className = "flex items-center space-x-2 bg-orange-100 dark:bg-orange-900/20 text-orange-700 dark:text-orange-400 px-4 py-2 rounded-lg text-sm border border-orange-200 dark:border-orange-800" >
119- < svg className = "w-4 h-4" fill = "none" stroke = "currentColor" viewBox = "0 0 24 24" >
120- < path strokeLinecap = "round" strokeLinejoin = "round" strokeWidth = "2" d = "M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L4.082 16.5c-.77.833.192 2.5 1.732 2.5z" />
121- </ svg >
122- < span > Guest Mode</ span >
123- </ div >
124117 ) : (
125- < div className = "flex items-center space-x-2" >
126- < button
127- onClick = { ( ) => window . location . href = '/api/auth/login' }
128- className = "bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg text-sm transition-colors"
129- >
130- Sign in
131- </ button >
132- < button
133- onClick = { onBypass }
134- className = "bg-gray-500 hover:bg-gray-600 text-white px-3 py-2 rounded-lg text-sm transition-colors"
135- title = "Continue without signing in"
136- >
137- Skip
138- </ button >
139- </ div >
118+ < button
119+ onClick = { ( ) => window . location . href = '/api/auth/login' }
120+ className = "bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg text-sm transition-colors"
121+ >
122+ Sign in
123+ </ button >
140124 ) }
141125 </ div >
142126) ) ;
@@ -479,37 +463,8 @@ const OutputFormatSelector: React.FC<{
479463} ;
480464
481465export default function HomePage ( ) {
482- // Auth state with bypass mechanism
466+ // Auth state
483467 const { user, error : userError , isLoading : userLoading } = useUser ( ) ;
484- const [ authBypass , setAuthBypass ] = useState ( false ) ;
485- const [ authTimeout , setAuthTimeout ] = useState ( false ) ;
486-
487- // Auto-bypass auth after 10 seconds if loading
488- useEffect ( ( ) => {
489- const timer = setTimeout ( ( ) => {
490- if ( userLoading && ! user && ! userError ) {
491- console . log ( '🔄 Auth taking too long, enabling bypass mode' ) ;
492- setAuthTimeout ( true ) ;
493- setAuthBypass ( true ) ;
494- toast . info ( 'Authentication is taking longer than expected. Continuing in guest mode.' , {
495- duration : 5000 ,
496- } ) ;
497- }
498- } , 10000 ) ;
499-
500- return ( ) => clearTimeout ( timer ) ;
501- } , [ userLoading , user , userError ] ) ;
502-
503- // Auto-bypass if there's an auth error
504- useEffect ( ( ) => {
505- if ( userError ) {
506- console . log ( '❌ Auth error detected, enabling bypass mode:' , userError ) ;
507- setAuthBypass ( true ) ;
508- toast . warning ( 'Authentication failed. Continuing in guest mode.' , {
509- duration : 5000 ,
510- } ) ;
511- }
512- } , [ userError ] ) ;
513468
514469 // Form state
515470 const [ selectedFile , setSelectedFile ] = useState < File | null > ( null ) ;
@@ -809,14 +764,6 @@ export default function HomePage() {
809764 setCurrentSlideIndex ( 0 ) ;
810765 } , [ ] ) ;
811766
812- const handleAuthBypass = useCallback ( ( ) => {
813- setAuthBypass ( true ) ;
814- console . log ( '🔓 User manually bypassed authentication' ) ;
815- toast . success ( 'Continuing in guest mode. You can still use all features!' , {
816- duration : 4000 ,
817- } ) ;
818- } , [ ] ) ;
819-
820767 // Keyboard shortcuts
821768 useKeyboardShortcuts ( {
822769 [ SHORTCUTS . NEW ] : handleNewPresentation ,
@@ -825,16 +772,16 @@ export default function HomePage() {
825772 [ SHORTCUTS . HELP ] : ( ) => setShowHelpModal ( true )
826773 } , { enabled : ! isAnalyzing } ) ;
827774
828- // Loading and error states with bypass support
829- if ( userLoading && ! authBypass && ! authTimeout ) return < LoadingState /> ;
830- if ( userError && ! authBypass ) return < ErrorState error = { ( userError as Error ) ?. message || 'An error occurred' } /> ;
775+ // Loading and error states
776+ if ( userLoading ) return < LoadingState /> ;
777+ if ( userError ) return < ErrorState error = { ( userError as Error ) ?. message || 'An error occurred' } /> ;
831778
832779 // Editor view - Apple-style presentation editor
833780 if ( viewMode === 'editor' && currentPresentation ) {
834781 return (
835782 < div className = "min-h-screen bg-white dark:bg-black transition-colors duration-500" >
836783 < MinimalBackground />
837- < AuthHeader user = { user } authBypass = { authBypass } onBypass = { handleAuthBypass } />
784+ < AuthHeader user = { user } />
838785
839786 { /* Header */ }
840787 < div className = "bg-white/80 dark:bg-black/80 backdrop-blur-xl border-b border-gray-200/50 dark:border-gray-700/50 p-3 sm:p-4" >
@@ -902,7 +849,7 @@ export default function HomePage() {
902849 return (
903850 < div className = "min-h-screen bg-white dark:bg-black transition-colors duration-500" >
904851 < MinimalBackground />
905- < AuthHeader user = { user } authBypass = { authBypass } onBypass = { handleAuthBypass } />
852+ < AuthHeader user = { user } />
906853
907854 { /* Main Content */ }
908855 < main className = "relative z-10 min-h-screen flex flex-col items-center justify-start px-4 sm:px-6 py-6 sm:py-12 md:py-20" >
0 commit comments