isd-sgcu/rnkm65-frontend

Inconsistent behavior of router.query between getStaticProps and getServerSideProps in login page

Closed this issue · 2 comments

There are some problem in login page on dev branch that if we use getStaticProps to make it SSG and when user have been redirected from SSO to login page, the useEffect will trigger only 1 time that router.query.token is still undefined for some reason and make it stuck to login page even we have token

image

image

But this behavior not appear when we use getServerSideProps for some reason

image

(Tokens in image are from Mock SSO)

I suspect that this Is this Next.js limitations?

I suspect that this Is this Next.js limitations?

Possible