404labfr / 404labfr/laravel-impersonate
[Bug]: Setting auth middleware in the controller stops use with multiple guards
未關閉
- 主要語言
- PHP
- 星號
- 2.3k
- 分支
- 235
- PR 合併指標
- 30 天內沒有已合併 PR
描述
```php
// src/Controllers/ImpersonateController.php
public function __construct()
{
$this->manager = app()->make(ImpersonateManager::class);
$guard = $this->manager->getDefaultSessionGuard();
$this->middleware('auth:' . $guard)->only('take');
}
```
While it's important to encourage security, this forced middleware in the constructor means that if you're using this package for impersonating anything other than the default guard, it won't work since it'll just redirect to login.
貢獻指南
這個儲存庫沒有索引到貢獻指南
評估
這個 Issue 還沒有評估資料。