Skip to content

Commit

Permalink
FEAT: SNS 연동 방식 쿠키로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
wet6123 committed Feb 26, 2025
1 parent 42a5a7e commit 7820922
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
10 changes: 0 additions & 10 deletions frontend/src/Cabinet/api/axios/axios.custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -985,13 +985,3 @@ export const axiosGetUserItems = async (
throw error;
}
};

const axiosGetAccountLinkDataURL = "/v4/auth/link";
export const axiosGetAccountLinkData = async (): Promise<any> => {
try {
const response = await instance.get(axiosGetAccountLinkDataURL);
return response;
} catch (error) {
throw error;
}
};
11 changes: 2 additions & 9 deletions frontend/src/Cabinet/pages/ProfilePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import PointColorCardContainer from "@/Cabinet/components/Card/PointColorCard/Po
import ProfileCardContainer from "@/Cabinet/components/Card/ProfileCard/ProfileCard.container";
import LoadingAnimation from "@/Cabinet/components/Common/LoadingAnimation";
import {
axiosGetAccountLinkData,
axiosMyInfo,
axiosUpdateDeviceToken,
} from "@/Cabinet/api/axios/axios.custom";
Expand Down Expand Up @@ -86,15 +85,9 @@ const ProfilePage = () => {
<div>{myInfo.oauthMail}</div>
) : (
<button
onClick={async () => {
const accountLinkData = await axiosGetAccountLinkData();

onClick={() => {
window.location.replace(
`${
import.meta.env.VITE_BE_HOST
}/oauth2/authorization/google?link_code=${
accountLinkData.data.oauthLink
}`
`${import.meta.env.VITE_BE_HOST}/oauth2/authorization/google`
);
}}
>
Expand Down

0 comments on commit 7820922

Please sign in to comment.