Skip to content

Commit

Permalink
๐Ÿ“ Modify(#67): handleLogin fake Token ์ฃผ์„
Browse files Browse the repository at this point in the history
  • Loading branch information
bluetree7878 committed Dec 12, 2024
1 parent 317b7b5 commit ad4d371
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/features/login/service/handleLogin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setCookie } from '@utils/cookies';
// import { setCookie } from '@utils/cookies';

const BASE_URL = import.meta.env.VITE_BASE_URL;

Expand All @@ -7,17 +7,17 @@ const handleLogin = (provider: 'google' | 'kakao' | 'github') => {
window.location.href = redirectUrl;

// ํ…Œ์ŠคํŠธ์šฉ accessToken ๋ฐ refreshToken ์ƒ์„ฑ ๋ฐ ์ฟ ํ‚ค์— ์ €์žฅ (์‹ค์ œ Service์— ๋ฐฐํฌํ•  ๋•Œ๋Š” ์ฃผ์„ ๋‹ฌ๊ฑฐ๋‚˜ ์‚ญ์ œ)
const fakeAccessToken = 'test.access.token';
const fakeRefreshToken = 'test.refresh.token';
// const fakeAccessToken = 'test.access.token';
// const fakeRefreshToken = 'test.refresh.token';

setCookie('accessToken', fakeAccessToken, { path: '/', maxAge: 3600 }); // 1์‹œ๊ฐ„ ์œ ํšจ
setCookie('refreshToken', fakeRefreshToken, {
path: '/',
maxAge: 3600 * 24 * 30,
}); // 30์ผ ์œ ํšจ
// setCookie('accessToken', fakeAccessToken, { path: '/', maxAge: 3600 }); // 1์‹œ๊ฐ„ ์œ ํšจ
// setCookie('refreshToken', fakeRefreshToken, {
// path: '/',
// maxAge: 3600 * 24 * 30,
// }); // 30์ผ ์œ ํšจ

alert('AccessToken ์ƒ์„ฑ ์™„๋ฃŒ: ' + fakeAccessToken);
alert('RefreshToken ์ƒ์„ฑ ์™„๋ฃŒ: ' + fakeRefreshToken);
// alert('AccessToken ์ƒ์„ฑ ์™„๋ฃŒ: ' + fakeAccessToken);
// alert('RefreshToken ์ƒ์„ฑ ์™„๋ฃŒ: ' + fakeRefreshToken);
};

export default handleLogin;

0 comments on commit ad4d371

Please sign in to comment.