fastfeedback icon indicating copy to clipboard operation
fastfeedback copied to clipboard

redirect the user after removing cookie

Open AbdelrhmanAmin opened this issue 2 years ago • 1 comments

Hi @leerob 🙂 I am currently watching your course and I appreciate the content.

BTW this is my first open-source contribution 😅

While I was trying the website I found the following behavior after signing out. image

I assumed the issue might be coming from here: https://github.com/leerob/fastfeedback/blob/c039566a6731a3f65c3fd8cc7388e5599e755ca0/lib/auth.js#L85-L92

Routing to root index before removing the cookie...The script will confirm the cookie and thus redirect the user back to the dashboard. https://github.com/leerob/fastfeedback/blob/c039566a6731a3f65c3fd8cc7388e5599e755ca0/pages/index.js#L35-L42

I believe the solution is to perform the routing after clearing the cookies.

AbdelrhmanAmin avatar Apr 01 '22 22:04 AbdelrhmanAmin

Someone is attempting to deploy a commit to a Personal Account owned by @leerob on Vercel.

@leerob first needs to authorize it.

vercel[bot] avatar Apr 01 '22 22:04 vercel[bot]