Subject: | destroy() does not actually destroy session |
The destroy method only removes the cookie from the parsed hash. Instead it needs to expire
the cookie (and probably empty it as well).
Replace
delete Dancer::Cookies->cookies->{$self->session_name};
with
Dancer::Cookies->cookie( $self->session_name => '', expires => '-1 day' );