diff --git a/src/services/apis/auth.ts b/src/services/apis/auth.ts index b17c92f..1fa40d5 100644 --- a/src/services/apis/auth.ts +++ b/src/services/apis/auth.ts @@ -3,8 +3,12 @@ import type { IAuthData, IAuthResponse, OAuthProvider } from "types"; const redirectUrl: string = `${import.meta.env.VITE_CLIENT_URL}/login/callback`; const authorizeUrl: Record = { - KAKAO: `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${import.meta.env.VITE_OAUTH_KAKAO_KEY}&redirect_uri=${redirectUrl}/kakao`, - NAVER: `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${import.meta.env.VITE_OAUTH_NAVER_KEY}&redirect_uri=${redirectUrl}/naver`, + KAKAO: `https://kauth.kakao.com/oauth/authorize?response_type=code&client_id=${ + import.meta.env.VITE_OAUTH_KAKAO_KEY + }&redirect_uri=${redirectUrl}/kakao`, + NAVER: `https://nid.naver.com/oauth2.0/authorize?response_type=code&client_id=${ + import.meta.env.VITE_OAUTH_NAVER_KEY + }&redirect_uri=${redirectUrl}/naver`, }; /** @@ -12,7 +16,8 @@ const authorizeUrl: Record = { * @param provider */ export const requestOAuthLogin = (provider: OAuthProvider) => { - location.href = authorizeUrl[provider]; + //location.href = authorizeUrl[provider]; + window.open(authorizeUrl[provider], "_blank"); }; /**