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 还没有评估数据。