Resume Craft: Your go-to platform for effortlessly tailoring ATS-friendly resumes to job descriptions. Streamline your job application process and stand out in the competitive market.
Open a new tab and go to any auth route (login/ signup).
On first login/signup, the navigation to home page fails, and user is redirected to login page.
The issue is reproducible only in prod. The nav works fine in dev env.
The cookies are authenticated and set correctly in both prod and dev environment on successful login
But, in prod, the session cookie is not being passed to middleware on the transition from auth -> home page after first login is successful.
Temp solution
Using router.refresh() instead of router.push("/home") works for now (because after session cookie is set and we try to access the auth routes, we are redirected to home page)
Hence, currently redirecting to home page using router.refresh().
Todo: Find a solution to this and fix this hotfix.
Describe the bug
Open a new tab and go to any auth route (login/ signup). On first login/signup, the navigation to home page fails, and user is redirected to login page.
Investigation
On investigation (https://github.com/amlan-roy/resume-craft/issues/77, https://github.com/amlan-roy/resume-craft/pull/89, https://github.com/amlan-roy/resume-craft/pull/92), I noticed the following:
Temp solution
Using
router.refresh()
instead ofrouter.push("/home")
works for now (because after session cookie is set and we try to access the auth routes, we are redirected to home page)Hence, currently redirecting to home page using router.refresh().
Todo: Find a solution to this and fix this hotfix.