Replies: 6 comments 2 replies
-
What about just returning that empty Or even not even setup the route altogether and perform the logic clientside on button click? Although maybe it is best practice to have a dedicated |
Beta Was this translation helpful? Give feedback.
-
This works for me:
Next opts out of rendering the page if you end the response, but you still need to return the correct value shape. cc @ijjk |
Beta Was this translation helpful? Give feedback.
-
If I have some time, I think I can open a PR to resolve this—most of it will center around checking |
Beta Was this translation helpful? Give feedback.
-
Did you find a workaround for this? I stumbled upon the same issues (first, |
Beta Was this translation helpful? Give feedback.
-
There's a lot of discussion about this in another thread: #11281 |
Beta Was this translation helpful? Give feedback.
-
Opened a RFC for redirecting here: #14890 |
Beta Was this translation helpful? Give feedback.
-
I'm attempting to build this flow with Next.js 9.3, and am unable to find a solution:
The login part works fine, as does clearing the cookie. My first implementation was adding this to my otherwise non-rendering
LogoutPage
:This actually works fine, and the cookie is cleared and a redirect occurs, but every time it runs, there's an error in the console
TypeError: Cannot convert undefined or null to object
caused by this line which expectsgetServerSideProps
function to return an object containing aprops
object.Is there a better way to write this flow? My current workaround is just to use a custom server, which feels like overkill for such a minor thing, and it requires a real page refresh. Is that what I should be doing?
Beta Was this translation helpful? Give feedback.
All reactions