amlan-roy / resume-craft

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.
https://resume-craft-ten.vercel.app
7 stars 3 forks source link

First navigation from auth routes to home page fails #91

Open amlan-roy opened 6 months ago

amlan-roy commented 6 months ago

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 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.