404labfr / 404labfr/laravel-impersonate
[Bug]: Setting auth middleware in the controller stops use with multiple guards
Offen
- Vorherrschende Sprache
- PHP
- Sterne
- 2.3k
- Forks
- 235
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
```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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Bewertung
Dieses Issue wurde noch nicht bewertet.