Remove offline mode option

This commit removes the offline mode functionality and focuses on resolving server-side issues.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 13:20:51 +00:00
parent 4f8b1c0189
commit 5853e5f51b
4 changed files with 145 additions and 50 deletions

View File

@@ -1,18 +1,17 @@
import { supabase } from '@/lib/supabase';
import { handleNetworkError, parseResponse, showAuthToast, isOfflineMode, createDemoUser } from './auth.utils';
import { handleNetworkError, parseResponse, showAuthToast, verifyServerConnection } from './auth.utils';
export const signIn = async (email: string, password: string) => {
try {
// 오프라인 모드 확인
if (isOfflineMode()) {
console.log('오프라인 모드로 로그인 시도:', email);
// 데모 사용자 생성 (데모 모드용)
const demoUser = createDemoUser(email, email.split('@')[0]);
showAuthToast('로그인 성공', '오프라인 모드로 로그인되었습니다.');
return { error: null, user: demoUser };
// 서버 연결 상태 먼저 확인
const connectionStatus = await verifyServerConnection();
if (!connectionStatus.connected) {
showAuthToast('서버 연결 실패', connectionStatus.message, 'destructive');
return {
error: { message: `서버 연결에 실패했습니다: ${connectionStatus.message}` },
user: null
};
}
console.log('로그인 시도 중:', email);