Auth Session Expiring Issue In Laravel Programming — Resolved

Webner Solutions
1 min readAug 16, 2021

--

Auth Session Expiring Issue In Laravel Programming — Resolved
Auth Session Expiring Issue In Laravel Programming — Resolved

I have created a web application in Laravel. I am using an authentication plugin to authorize the users while logging-in on my web application. On my local system, everything was working fine.

But when I uploaded my Laravel project from the local server to the test server, I faced one problem. When the user was trying to log in by entering their correct credentials, he was always redirected to the login page. Because the Auth session was not persisting on the welcome page. When I printed out the Auth::user() value, it was always showing an empty array

Finally, to solve this problem I have run the below commands on the test server:
php artisan cache:clear
php artisan config:cache
php artisan view:clear
php artisan route:clear
php artisan route:cache

And got the results as “User logged-in successfully!”.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Originally published at https://blog.webnersolutions.com on August 16, 2021.

--

--

Webner Solutions
Webner Solutions

Written by Webner Solutions

Our team in Salesforce is very strong, with in-depth knowledge of Salesforce classic and Lightning development as well as the Service cloud.

Responses (1)