Fix sign-up failure handling
The sign-up failure logic was not properly implemented. This commit addresses the issue.
This commit is contained in:
@@ -14,6 +14,24 @@ const isValidUrl = supabaseUrl && supabaseAnonKey &&
|
||||
let supabaseClient;
|
||||
|
||||
try {
|
||||
console.log(`Supabase 클라이언트 생성 시도: ${supabaseUrl}`);
|
||||
|
||||
// 테스트용 fetch 실행
|
||||
try {
|
||||
fetch(`${supabaseUrl}/auth/v1/signup`, {
|
||||
method: 'OPTIONS',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
}).then(response => {
|
||||
console.log(`Supabase 서버 연결 테스트 응답:`, response.status);
|
||||
}).catch(err => {
|
||||
console.warn(`Supabase 서버 연결 테스트 실패:`, err.message);
|
||||
});
|
||||
} catch (e) {
|
||||
console.warn('Supabase 서버 연결 테스트 중 오류:', e);
|
||||
}
|
||||
|
||||
// Supabase 클라이언트 생성
|
||||
supabaseClient = createClient(supabaseUrl, supabaseAnonKey, {
|
||||
auth: {
|
||||
@@ -36,8 +54,11 @@ try {
|
||||
supabaseClient = {
|
||||
auth: {
|
||||
getUser: () => Promise.resolve({ data: { user: null } }),
|
||||
getSession: () => Promise.resolve({ data: { session: null } }),
|
||||
signInWithPassword: () => Promise.reject(new Error('Supabase 설정이 필요합니다')),
|
||||
signUp: () => Promise.reject(new Error('Supabase 설정이 필요합니다')),
|
||||
signOut: () => Promise.resolve({ error: null }),
|
||||
onAuthStateChange: () => ({ data: { subscription: { unsubscribe: () => {} } } }),
|
||||
},
|
||||
from: () => ({
|
||||
select: () => ({ eq: () => ({ data: null, error: new Error('Supabase 설정이 필요합니다') }) }),
|
||||
|
||||
Reference in New Issue
Block a user