# Laravel - not extracting user details from session

**URL:** <https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763>\
**Category:** Get Help\
**Tags:** laravel, login, auth0\
**Created:** [July 25, 2021, 5:24pm UTC](https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763 "2021-07-25T17:24:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielvyyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/danielvyyer/32/12778_2.png) [@danielvyyer](https://community.auth0.com/u/danielvyyer)\
**Post date:** [July 25, 2021, 5:24pm UTC](https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763/1 "2021-07-25T17:24:46Z")

</div>

Hello everyone,

I’ve went through the instructions in the [site](https://auth0.com/docs/quickstart/webapp/laravel) to set up my web-based Laravel application, has successfully connected it to the application and can see successful logins under the user logs tab.

The problem that I’m getting, however, is the ability to retrieve my user via Auth::user() or Auth::check() calls, that return null. What else that must be done so that Laravel processes session cookies and return a structure that contains user information?

I have tried persisting user information in laravel-auth0.php file to no avail. What else should be done to receive a valid user from session?

---

<div class="post-metadata">

**Author:** ![danielvyyer](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/danielvyyer/32/12778_2.png) [@danielvyyer](https://community.auth0.com/u/danielvyyer)\
**Post date:** [July 25, 2021, 5:38pm UTC](https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763/2 "2021-07-25T17:38:43Z")

</div>

Nevermind, I figured that the problem was in the session driver configuration in .env file which was incorrect and thus wasn’t saving session. After changing it to ‘file’ it has started working and Auth::user() is returning the structure for authenticated user.

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 26, 2021, 9:14am UTC](https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763/3 "2021-07-26T09:14:02Z")

</div>

Perfect and thanks for sharing with the rest of community!

---

<div class="post-metadata">

**Author:** ![konrad.sopala](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/konrad.sopala/32/13516_2.png) [@konrad.sopala](https://community.auth0.com/u/konrad.sopala)\
**Post date:** [July 29, 2021, 10:50am UTC](https://community.auth0.com/t/laravel-not-extracting-user-details-from-session/66763/4 "2021-07-29T10:50:26Z")

</div>


