Fix Supabase Storage API calls

Corrected endpoint paths and authorization headers for Supabase Storage API calls.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-15 14:57:10 +00:00
parent 09f6f9d5fa
commit 8b783c741d
4 changed files with 64 additions and 2 deletions

View File

@@ -13,7 +13,6 @@ export const signInWithDirectApi = async (email: string, password: string) => {
const tokenUrl = `${supabase.auth.url}/token?grant_type=password`;
const headers = {
'Content-Type': 'application/json',
'apikey': supabase.supabaseKey,
'Authorization': `Bearer ${supabase.supabaseKey}`,
'X-Client-Info': 'supabase-js/2.x'
};

View File

@@ -35,6 +35,7 @@ export const signUp = async (email: string, password: string, username: string)
// 회원가입 시도 (기본 방식)
try {
// 온프레미스 서버에 적합한 옵션 추가
const { data, error } = await supabase.auth.signUp({
email,
password,
@@ -42,6 +43,8 @@ export const signUp = async (email: string, password: string, username: string)
data: {
username,
},
// 이메일 확인 URL 생략 (온프레미스에서는 일반적으로 사용하지 않음)
emailRedirectTo: undefined
},
});