Handle sign-up callback
Handle the callback after a user signs up.
This commit is contained in:
@@ -22,9 +22,10 @@ export const signUp = async (email: string, password: string, username: string)
|
|||||||
return { error: { message: 'Supabase 설정이 올바르지 않습니다. 설정 페이지에서 확인해주세요.' }, user: null };
|
return { error: { message: 'Supabase 설정이 올바르지 않습니다. 설정 페이지에서 확인해주세요.' }, user: null };
|
||||||
}
|
}
|
||||||
|
|
||||||
// 현재 브라우저 URL 가져오기 (localhost 대신 실제 도메인 사용)
|
// 현재 브라우저 URL 가져오기
|
||||||
const currentUrl = window.location.origin;
|
const currentUrl = window.location.origin;
|
||||||
const redirectUrl = `${currentUrl}/login`;
|
// 해시 대신 쿼리 파라미터 방식으로 URL 구성 (auth_callback 파라미터 추가)
|
||||||
|
const redirectUrl = `${currentUrl}/login?auth_callback=true`;
|
||||||
|
|
||||||
console.log('이메일 인증 리디렉션 URL:', redirectUrl);
|
console.log('이메일 인증 리디렉션 URL:', redirectUrl);
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,8 @@ export const signUpWithDirectApi = async (email: string, password: string, usern
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 리디렉션 URL 설정 (전달되지 않은 경우 기본값 사용)
|
// 리디렉션 URL 설정 (전달되지 않은 경우 기본값 사용)
|
||||||
const finalRedirectUrl = redirectUrl || `${window.location.origin}/login`;
|
// 해시(#) 대신 쿼리 파라미터(?token=) 방식으로 URL 구성
|
||||||
|
const finalRedirectUrl = redirectUrl || `${window.location.origin}/login?auth_callback=true`;
|
||||||
console.log('이메일 인증 리디렉션 URL (API):', finalRedirectUrl);
|
console.log('이메일 인증 리디렉션 URL (API):', finalRedirectUrl);
|
||||||
|
|
||||||
// API 요청 전송
|
// API 요청 전송
|
||||||
|
|||||||
Reference in New Issue
Block a user