404labfr / 404labfr/laravel-impersonate

[Bug]: Setting auth middleware in the controller stops use with multiple guards

未關閉
#233 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
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 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。