Skip to content

Commit

Permalink
fix: do not use test jwt
Browse files Browse the repository at this point in the history
  • Loading branch information
ooooorobo committed Oct 26, 2024
1 parent eac76c5 commit 6c21ab3
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 0 additions & 13 deletions src/app/routes/auth.kakao.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,6 @@ import { loginKakao } from 'src/types';
import { commitSession, generateExpiredDate, getAuthSession } from 'src/app/server/sessions';

export const loader: LoaderFunction = async ({ request }) => {
if (import.meta.env.DEV) {
const session = await getAuthSession(request);
session.set('accessToken', process.env.VITE_DEV_JWT_TOKEN ?? '');
session.set('refreshToken', process.env.VITE_DEV_JWT_TOKEN ?? '');
session.set('expiredAt', generateExpiredDate());

return redirect('/', {
headers: {
'Set-Cookie': await commitSession(session),
},
});
}

const searchParams = new URL(request.url).searchParams;
const code = searchParams.get('code');

Expand Down
2 changes: 1 addition & 1 deletion src/pages/main/login/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const LoginPage = () => {
<h1>내 사랑 구해줄래? 구해줄게!</h1>
</div>
<div className={styles.ButtonWrapper}>
<Link to={import.meta.env.DEV ? '/auth/kakao' : import.meta.env.VITE_KAUTH_URL}>
<Link to={import.meta.env.VITE_KAUTH_URL}>
<button className={`${styles.Button} ${styles.Kakao}`}>
<span className={styles.Icon}>
<img src="/images/kakao.png" alt="카카오 로그인" width={29} height={29} />
Expand Down

0 comments on commit 6c21ab3

Please sign in to comment.