404labfr / 404labfr/laravel-impersonate

Package seems not to work with Sanctum / Laravel 9?

Đang mở
#156 19 bình luận 3 reaction 0 người được giao Xem trên GitHub
possible bug
Ngôn ngữ chính
PHP
Star
2.3k
Fork
235
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Hi there guys,

I have some really weird issue implementing this package in a project of mine. This is weird, since I have two other projects with this package working.

The error I am receiving when installing this package is:

```
InvalidArgumentException : Auth driver [sanctum] for guard [sanctum] is not defined.
/project/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php:117
/project/vendor/laravel/framework/src/Illuminate/Auth/AuthManager.php:76
/project/vendor/laravel/sanctum/src/Sanctum.php:68
```

I have done some digging and found out that the `sanctum` driver is missing in the `customCreators` property of `AuthManager`. When I disable the `ImpersonateServiceProvider::registerAuthDriver` method, my tests run perfectly, but impersonation doesn't work. I see that the `sanctum` driver is visible in the `customCreators` property of `AuthManager`.

I am not a specialist in the authentication system of Laravel, so I don't have any clue why this is happening.

Do you have any direction for me to dig further?

Regards, Bob

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.