404labfr / 404labfr/laravel-impersonate
[Bug]: Setting auth middleware in the controller stops use with multiple guards
Abierto
- Lenguaje dominante
- PHP
- Estrellas
- 2.3k
- Forks
- 235
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
```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.
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.