File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,10 @@ declare global {
1515}
1616
1717// 환경별 리다이렉트 URI 가져오기
18- const getRedirectUri = ( ) => {
19- return import . meta . env . MODE === "development "
20- ? "http://localhost:5173/api/auth/login" // 로컬 환경
21- : "https://api.dev.farmsystem.kr/api/auth/login" ; // 개발 서버 환경
18+ const getRedirectUri = ( provider : "KAKAO" | "GOOGLE" ) => {
19+ return provider === "KAKAO "
20+ ? import . meta . env . VITE_KAKAO_REDIRECT_URI
21+ : import . meta . env . VITE_GOOGLE_REDIRECT_URI ;
2222} ;
2323
2424// 환경 감지 (웹 vs 카카오 앱)
@@ -52,7 +52,7 @@ export const useSocialLogin = () => {
5252 } , [ ] ) ;
5353
5454 const handleLogin = ( provider : "KAKAO" | "GOOGLE" ) => {
55- const redirectUri = getRedirectUri ( ) ;
55+ const redirectUri = getRedirectUri ( provider ) ;
5656 const clientId =
5757 provider === "KAKAO"
5858 ? import . meta. env . VITE_KAKAO_CLIENT_ID
You can’t perform that action at this time.
0 commit comments