diff --git a/.env.development b/.env.development index 4ef5628e..b6ecb6c9 100644 --- a/.env.development +++ b/.env.development @@ -2,7 +2,7 @@ NEXT_PUBLIC_ORIGIN=http://localhost:3000 NEXT_PUBLIC_FACEBOOK_APP_ID= NEXT_PUBLIC_GOOGLE_OAUTH_CLIENT_ID=456944189609-jo13a6v8cb25vofi8qfldu3ionkq4u2q.apps.googleusercontent.com NEXT_PUBLIC_APPLE_OAUTH_APP_ID=com.sopt-playground.sopt-iOS -NEXT_PUBLIC_API_URL=https://playground.dev.sopt.org +NEXT_PUBLIC_API_URL=https://playground-dev.sopt.org NEXT_PUBLIC_DEBUG=true NEXT_PUBLIC_GTM_ID=GTM-KJHR376 NEXT_PUBLIC_AMPLITUDE_API_KEY= @@ -10,5 +10,5 @@ NEXT_PUBLIC_KAKAO_TALK_PLUGIN_KEY= NEXT_PUBLIC_ADMIN_API_URL=https://api-dev.sopt.org/v2 NEXT_PUBLIC_ADMIN_API_KEY= NEXT_PUBLIC_OPERATION_API_URL=https://operation.api.dev.sopt.org -NEXT_PUBLIC_AUTH_API_URL=https://auth.api.dev.sopt.org -NEXT_PUBLIC_CREW_API_URL=https://crew.api.dev.sopt.org \ No newline at end of file +NEXT_PUBLIC_AUTH_API_URL=https://auth-dev-api.sopt.org +NEXT_PUBLIC_CREW_API_URL=https://crew-dev.sopt.org \ No newline at end of file diff --git a/src/api/index.ts b/src/api/index.ts index a1b7e601..de8136ed 100644 --- a/src/api/index.ts +++ b/src/api/index.ts @@ -95,8 +95,8 @@ export const handleTokenError = async (error: AxiosError) => { // 개인정보 처리방침 페이지는 로그인 필요 없음, 구글 정책상 오픈 return Promise.reject(error); } - // 에스크 문자를 통한 딥링크 접근을 위해 허용 - if (window.location.pathname === '/.well-known/apple-app-site-association' || '/.well-known/assetlinks.json') { + // 앱 딥링크를 위한 .well-known 경로는 인증 체크 제외 + if (window.location.pathname.startsWith('/.well-known')) { return Promise.reject(error); } /** 토큰이 없으면 refresh 시도하지 않고 바로 intro로 이동 */ @@ -105,6 +105,7 @@ export const handleTokenError = async (error: AxiosError) => { window.location.replace('/intro'); throw new Error('토큰이 없습니다.'); } + try { const { data } = await axiosAuthInstance.post<{ data: { accessToken: string } }>( `/api/v1/auth/refresh/web`,