jeudi 12 avril 2018

Make login with adjusted session config values

I am implementing some sort of hashed login, where a user gets an E-Mail with a login token which is used to login the underlying user. I want this login token to only be available for one browser session.

Basically the thing works if I change in config/session.php the value 'expire_on_close' => true. But I don't want my sessions to expire for every login - only for the ones using the login token.

I tried to use

Config::set('session.expire_on_close', true);
Auth::login($user, false);

but without success. I believe that the session cookie might already be initiated before the Auth::login - or is it another issue? Any ideas how to achieve this?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire