Fix signup redirect URL
The signup redirect URL was incorrect, leading to issues with email verification. This commit fixes the URL to ensure proper redirection after signup.
This commit is contained in:
@@ -6,7 +6,7 @@ import { getProxyType, isCorsProxyEnabled, getSupabaseUrl, getOriginalSupabaseUr
|
||||
/**
|
||||
* 직접 API 호출을 통한 회원가입
|
||||
*/
|
||||
export const signUpWithDirectApi = async (email: string, password: string, username: string) => {
|
||||
export const signUpWithDirectApi = async (email: string, password: string, username: string, redirectUrl?: string) => {
|
||||
try {
|
||||
console.log('직접 API 호출로 회원가입 시도 중');
|
||||
|
||||
@@ -24,6 +24,10 @@ export const signUpWithDirectApi = async (email: string, password: string, usern
|
||||
};
|
||||
}
|
||||
|
||||
// 리디렉션 URL 설정 (전달되지 않은 경우 기본값 사용)
|
||||
const finalRedirectUrl = redirectUrl || `${window.location.origin}/login`;
|
||||
console.log('이메일 인증 리디렉션 URL (API):', finalRedirectUrl);
|
||||
|
||||
// 프록시 정보 로깅
|
||||
const usingProxy = isCorsProxyEnabled();
|
||||
const proxyType = getProxyType();
|
||||
@@ -51,7 +55,8 @@ export const signUpWithDirectApi = async (email: string, password: string, usern
|
||||
body: JSON.stringify({
|
||||
email,
|
||||
password,
|
||||
data: { username } // 사용자 메타데이터에 username 추가
|
||||
data: { username }, // 사용자 메타데이터에 username 추가
|
||||
redirect_to: finalRedirectUrl // 리디렉션 URL 추가
|
||||
}),
|
||||
signal: AbortSignal.timeout(15000) // 타임아웃 시간 증가
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user