Closed Laupet closed 1 year ago
Thanks! In this moment, you only can make a CustomAction
, example:
use MagicLink\Actions\ActionAbstract;
class LoginWithRememberAction extends ActionAbstract
{
public function __construct(public int $userId)
{
}
public function run()
{
Auth::loginUsingId($this->id, true);
return parent::run();
}
}
But this feature will be interesting add in the LoginAction
, please, give me a few days to pull this request or, if you wish, you can send a PR.
This feature has been released in version v2.16.0
$action = new LoginAction(User::first());
$action->remember();
$urlShowView = MagicLink::create($action)->url;
Perfect, thanks alot. Already implemented the changes from 2.16. Works like a charm!
Great package you have made! Thanks.
Is it possible in any way to set "remember me" for the login action? I want the login session to last longer than the global SESSION_LIFETIME that is defined in .env.