Improve authentication error handling
- Enhance error messages for authentication failures.
This commit is contained in:
@@ -12,8 +12,13 @@ export const signUpWithDirectApi = async (email: string, password: string) => {
|
||||
const supabaseUrl = supabase.auth.url;
|
||||
const supabaseKey = localStorage.getItem('supabase_key') || supabase.supabaseKey;
|
||||
|
||||
// URL 경로 중복 방지를 위해 경로 확인 및 정규화
|
||||
const baseUrl = supabaseUrl?.endsWith('/auth/v1')
|
||||
? supabaseUrl
|
||||
: `${supabaseUrl}/auth/v1`;
|
||||
|
||||
// 회원가입 API 엔드포인트 및 헤더 설정
|
||||
const signUpUrl = `${supabaseUrl}/auth/v1/signup`;
|
||||
const signUpUrl = `${baseUrl}/signup`;
|
||||
const headers = {
|
||||
'Content-Type': 'application/json',
|
||||
'apikey': supabaseKey,
|
||||
|
||||
Reference in New Issue
Block a user