Repository navigation
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 |
|
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 |
|
If I have some time, I think I can open a PR to resolve thisβmost of it will center around checking |
|
Did you find a workaround for this? I stumbled upon the same issues (first, |
|
There's a lot of discussion about this in another thread: #11281 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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 objectcaused by this line which expectsgetServerSidePropsfunction to return an object containing apropsobject.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?
All reactions