Regenerate session ids in Laravel 5.2 - laravel

How can I regenerate session ids in Laravel 5.2 and change session id on every request and deleting old session ids?

Related

Managing users sessions by laravel authentication mechanism

first of all im new in Laravel and i used Codeigniter before...
Users in my project have one session for each system they logged in to and each session has its own token.
sessions are stored in sessions table and sessions table is related to users table for retrieving the users informations by token
User token and authentication is written by me and I do not use Laravel authentication system because I recently transferred my project from Codeigniter to Laravel.
so how can i manage this sessions and token generation with laravel authenticating system ?

Shared session between laravel and vue apps

I have 3 apps and those 2 are laravel apps and 1 is vuejs
I've tried setting up session to store session data in to the database so that I can have a shared sessions between my apps.
Things work between laravel apps, however, I have trouble when it comes to my vuejs app.
Btw, in order to proceed to any of my vue routes, I have to check first if token exists and is correct.
But since I am using laravel sessions now, I guess I need to check for cookie session id now?
and if so, where do I set the cookie session id?
Better use Laravel passport (OAuth) as a token generation for you Vue application.

Laravel Session + Cartalyst Sentry Session Issues

on Laravel 4.2 and using Sentry 2.1, it looks like there is no way to have Sentry use the same cookie as the laravel session. Right now, the cookies for Sentry are being set for 5 years into the future by default. I don't see a way in their configs for this to change. Looking in the package code, I do see the 'forever' function, but the time is not configurable from what I can tell.
The question here is how can you maintain a user's laravel session cookie is expiring sooner than the Sentry cookie, since some features are toggled on/off in session within Laravel, and if the cookie expiration is long than the Laravel session, it will throw the system into thinking it's OK for that user to be logged in when really the Laravel session is now an entirely new session.

Laravel delete DB session record after logout event

im building an application with laravel 4.2
Id like to know how laravel remove sessions records on DB after Auth::logout() call...
Its still there in my table.. with an empty payload but still there
thanks for reply

how to view user data in codeigniter using 3 times log out my data is not visible

I'm new in PHP and Codeigniter, by the way how to update database table when session in CI is expired and where I can put the code? I use uniqid in database, it's called token. here is my login tableusername, password, level, token, last_login, exp_time. and I want to change value token=null when session in Codeigniter is expired.
I think you're approaching this the wrong way. Sessions can expire passively, so your user DB would not be up to date.
You could use Codeigniter's option to store session data in your MySQL database and check against those entries.

Resources