Skip to content

Commit

Permalink
fix: 소셜 로그인 배포 url 수정 (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
osdoonhyun authored Feb 6, 2024
1 parent 1560386 commit 3bba796
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions selq-client/.env
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ REACT_APP_GOOGLE_AUTH_CLIENT_KEY=571403329655-7trhg1moiuk83cdpbgmbaucmaebg4hru.a

REACT_APP_DEPLOY_ENV=production

REACT_APP_PROD_BASE_URL=https://selq.store/api

REACT_APP_DEV_BASE_URL=http://localhost:8000/api
REACT_APP_PROD_BASE_URL=https://selq.store/api

REACT_APP_ORIGIN_URL=http://localhost:8000
REACT_APP_GOOGLE_LOGIN_URL=http://localhost:8000/api/auth/google
REACT_APP_PROD_ORIGIN_URL=https://selq.store

REACT_APP_GOOGLE_LOGIN_URL=http://localhost:8000/api/auth/google
REACT_APP_PROD_GOOGLE_LOGIN_URL=https://selq.store/api/auth/google

4 changes: 2 additions & 2 deletions selq-client/src/components/button/SocialLogInButton.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ export default function SocialLogInButton() {

const socialLogin = () => {
const popup = window.open(
process.env.REACT_APP_GOOGLE_LOGIN_URL,
process.env.REACT_APP_PROD_GOOGLE_LOGIN_URL,
'Google Login',
POPUP_STRING
);

const receiveLoginCompleteMessage = async (event) => {
if (
event.origin === process.env.REACT_APP_ORIGIN_URL &&
event.origin === process.env.REACT_APP_PROD_ORIGIN_URL &&
event.data === 'loginComplete'
) {
popup.close();
Expand Down

0 comments on commit 3bba796

Please sign in to comment.