Closed pavelsr closed 4 years ago
Auth::Basic is deprecated and not used by the main auth plugin. You want to read Yancy::Plugin::Auth::Password. I will add some documentation saying where to get the logout route for that plugin (the route's name is yancy.auth.password.logout
). I will also add a generic logout method and route to the main plugin so folks can do what they wish. Thanks for finding this issue!
Since nowhere in docs mention what is reserved session key for storing current user (I assume it's always
session->{yancy}{auth}
but still ) I think it could be useful to add into Yancy::Plugin::Auth section how to properly logout. I assume that it's always possible to do withdelete $c->session->{yancy}{auth}
, something likeBut maybe there is some public method to do logout ? Or should we add it?
Searching by code I've found that you made logout in Yancy::Plugin::Auth::Basic like
But when I tried to do similar in my app
I've got an error,
Can't locate object method "clear" via package "Mojolicious::Renderer::Helpers::4d3bfb8b02efde8b1bbef4956167936a"