Closed Happhee closed 2 years ago
Too many redirect라는 오류가 계속뜨는 이유는 session을 ssr로 렌더링을 안하면 계속해서 요청하기 때문에 이를 적용해주었다
Too many redirect
ssr
import { GetServerSideProps, InferGetServerSidePropsType } from 'next'; export default function login({ data, }: InferGetServerSidePropsType<typeof getServerSideProps>) { } export const getServerSideProps: GetServerSideProps = async (context) => { const session = await getSession({ req: context.req }); return { props: { data: { session }, }, }; };
🔥 Related Issues
🎡 작업 내용
✅ PR Point
📄 login.tsx
Too many redirect
라는 오류가 계속뜨는 이유는 session을ssr
로 렌더링을 안하면 계속해서 요청하기 때문에 이를 적용해주었다