Update default API URL
Update the default Supabase API URL to http://a11.ism.kr.
This commit is contained in:
@@ -16,7 +16,12 @@ export const signInWithDirectApi = async (email: string, password: string) => {
|
||||
? supabaseUrl
|
||||
: `${supabaseUrl}/auth/v1`;
|
||||
|
||||
const tokenUrl = `${baseUrl}/token?grant_type=password`;
|
||||
// URL에 중복 '/auth/v1' 경로가 있는지 확인하고 수정
|
||||
const normalizedUrl = baseUrl.includes('/auth/v1/auth/v1')
|
||||
? baseUrl.replace('/auth/v1/auth/v1', '/auth/v1')
|
||||
: baseUrl;
|
||||
|
||||
const tokenUrl = `${normalizedUrl}/token?grant_type=password`;
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${supabase.supabaseKey}`,
|
||||
@@ -48,7 +53,7 @@ export const signInWithDirectApi = async (email: string, password: string) => {
|
||||
console.warn('API 경로를 찾을 수 없음 (404). 새 엔드포인트 시도 중...');
|
||||
|
||||
// 대체 엔드포인트 시도 (/token 대신 /signin)
|
||||
const signinUrl = `${baseUrl}/signin`;
|
||||
const signinUrl = `${normalizedUrl}/signin`;
|
||||
|
||||
try {
|
||||
const signinResponse = await fetch(signinUrl, {
|
||||
|
||||
Reference in New Issue
Block a user