The logout route only works once - The flag dynamic = 'force-dynamic' not work
Unanswered
Crucian carp posted this in #help-forum
Crucian carpOP
The logout route only works once. To make it work properly, it is necessary to rename the file name or call it with some argument in the URL that has not been called yet. The server log shows one call to /logout but then shows the subsequent calls as /. The flag dynamic = 'force-dynamic'; mentioned in the documentation to prevent caching has no effect at all Can you advise me how to get the logout to work correctly as in the first night call? Thank you.
7 Replies
@Crucian carp put the export at the top
before your imports
@Arinji before your imports
Crucian carpOP
not work behavior is the same in the list or does not show that it goes to the lougout route I do not know why there is a root route / it just redirects and does not respond. do not understand at all why other routes work but just logout behaves like this.
what happens when you call logout?
and how are you calling it?
Crucian carpOP
redirects to the homepage but does not log the user out. If I rename the directory it all works only once. On the second call after login it does not work again, it just redirects but does not answer. It doesn't even show up in the log or it shows up as / not as /logout and it only does the logout route.
Crucian carpOP
Okey with Server Action it work good