Investigate login/signup failure

Investigate and address the "Failed to fetch" error during signup and login failures.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 15:48:52 +00:00
parent f25d55690d
commit 348194ccec
5 changed files with 97 additions and 30 deletions

View File

@@ -23,8 +23,8 @@ const SupabaseSettingsForm: React.FC<SupabaseSettingsFormProps> = ({ onSaved })
const [formState, setFormState] = useState({
supabaseUrl: '',
supabaseKey: '',
useProxy: false,
proxyType: 'corsproxy.io',
useProxy: true, // 기본값을 true로 변경
proxyType: 'cloudflare', // 기본값을 cloudflare로 변경
isSaving: false
});
@@ -37,15 +37,15 @@ const SupabaseSettingsForm: React.FC<SupabaseSettingsFormProps> = ({ onSaved })
useEffect(() => {
const savedUrl = localStorage.getItem('supabase_url');
const savedKey = localStorage.getItem('supabase_key');
const proxyEnabled = isCorsProxyEnabled();
const proxyEnabled = localStorage.getItem('use_cors_proxy') === 'true';
const savedProxyType = getProxyType();
setFormState(prev => ({
...prev,
supabaseUrl: savedUrl || '',
supabaseKey: savedKey || '',
useProxy: proxyEnabled,
proxyType: savedProxyType
useProxy: proxyEnabled === false ? false : true, // 저장된 값이 명시적으로 false인 경우에만 false, 아니면 기본값 true
proxyType: savedProxyType || 'cloudflare'
}));
}, []);