NAME
Convos::Plugin::Auth - Convos plugin for handling authentication
DESCRIPTION
Convos::Plugin::Auth is used to register, login and logout a user. This plugin is always loaded by Convos, but you can override the "HELPERS" with a custom auth plugin if you like.
Note that this plugin is currently EXPERIMENTAL. Let us know if you are/have created a custom plugin.
HELPERS
auth.login
$c->auth->login(\%credentials, sub { my ($c, $err, $user) = @_; });
Used to login a user. %credentials
normally contains an email
and password
.
auth.logout
$c->auth->logout({}, sub { my ($c, $err) = @_; });
Used to log out a user.
auth.register
$c->auth->register(\%credentials, sub { my ($c, $err, $user) = @_; });
Used to register a user. %credentials
normally contains an email
and password
. There is also EXPERIMENTAL support for an invite_code
.
METHODS
register
$self->register($app, \%config);