# Laravel User Impersonation

**URL:** <https://community.auth0.com/t/laravel-user-impersonation/36171>\
**Category:** Get Help\
**Tags:** impersonation, user-impersonation, laravel, php\
**Created:** [January 12, 2020, 5:44pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171 "2020-01-12T17:44:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![stanley](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@stanley](https://community.auth0.com/u/stanley)\
**Post date:** [January 12, 2020, 5:44pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/1 "2020-01-12T17:44:27Z")

</div>

Hi,

Laravel allows you to easily impersonate users using Auth::login($user). Since we implemented Auth0 for our users to login, we are no longer able to do this. After performing an Auth::login($user) and redirecting to the dashboard, we get redirected to the login page.

Anyone have any idea’s on how to successfully impersonate a user in Laravel when using Auth0 for login?

Thanks,

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 13, 2020, 10:31pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/3 "2020-01-13T22:31:40Z")

</div>

We used to provide an impersonation feature, but deprecated it due to security concerns that were raised.

If you can elaborate on your needs we may be able to come up with a strategy.

Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![stanley](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@stanley](https://community.auth0.com/u/stanley)\
**Post date:** [January 13, 2020, 10:39pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/4 "2020-01-13T22:39:24Z")

</div>

Hi Dan,

Sometimes we need to log in as our users in order to provide technical support or troubleshoot technical issues that a specific user might be experiencing.

Thanks,  
Brad

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 14, 2020, 5:34pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/5 "2020-01-14T17:34:44Z")

</div>

I understand, and unfortunately there is going to be no way to do this since we deprecated the feature due to the security concerns it raised. If you have a specific issue you need to troubleshoot or support topic, I may be able to provide guidance, but you will not be able to log in as your users.

---

<div class="post-metadata">

**Author:** ![stanley](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7c/User_font_awesome.svg/768px-User_font_awesome.svg.png) [@stanley](https://community.auth0.com/u/stanley)\
**Post date:** [January 14, 2020, 6:24pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/6 "2020-01-14T18:24:49Z")

</div>

Do you know if there’s any way to modify the larave-auth0 package to allow this directly in the application itself?

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 15, 2020, 9:13pm UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/7 "2020-01-15T21:13:55Z")

</div>

I don’t think you will be able to log in as a user without their name and password.

---

<div class="post-metadata">

**Author:** ![dan.woda](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dan.woda/32/18340_2.png) [@dan.woda](https://community.auth0.com/u/dan.woda)\
**Post date:** [January 30, 2020, 1:13am UTC](https://community.auth0.com/t/laravel-user-impersonation/36171/8 "2020-01-30T01:13:57Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
