File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import AppleLogo from '@/libs/assets/AppleLogo';
1212const LoginPage = ( ) => {
1313 const navigate = useNavigate ( ) ;
1414 const { data : isLogin , isLoading } = useGetIsLogin ( ) ;
15- const redirectionUrl = encodeURIComponent ( window . location . origin + '/' ) ;
15+ const redirectUrl = import . meta . env . VITE_REDIRECT_URL || undefined ;
1616
1717 useEffect ( ( ) => {
1818 if ( isLogin ) {
@@ -32,21 +32,21 @@ const LoginPage = () => {
3232 < div className = { s . ButtonContainer } >
3333 < a
3434 className = { s . LoginButton ( { src : 'apple' } ) }
35- href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/apple? redirectURI=${ redirectionUrl } ` }
35+ href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/apple${ redirectUrl ? `? redirectURI=${ redirectUrl } ` : '' } ` }
3636 >
3737 < AppleLogo />
3838 Apple로 로그인
3939 </ a >
4040 < a
4141 className = { s . LoginButton ( { src : 'google' } ) }
42- href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/google? redirectURI=${ redirectionUrl } ` }
42+ href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/google${ redirectUrl ? `? redirectURI=${ redirectUrl } ` : '' } ` }
4343 >
4444 < GoogleLogo />
4545 Google로 로그인
4646 </ a >
4747 < a
4848 className = { s . LoginButton ( { src : 'kakao' } ) }
49- href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/kakao? redirectURI=${ redirectionUrl } ` }
49+ href = { `${ import . meta. env . VITE_API_URL } /oauth2/authorization/kakao${ redirectUrl ? `? redirectURI=${ redirectUrl } ` : '' } ` }
5050 >
5151 < KakaoLogo />
5252 카카오톡으로 로그인
You can’t perform that action at this time.
0 commit comments