laravel / jetstream

Tailwind scaffolding for the Laravel framework.
https://jetstream.laravel.com
MIT License
3.98k stars 822 forks source link

Jetstream Livewire install /user/profile route requires email verified middleware #199

Closed georanma closed 4 years ago

georanma commented 4 years ago

Description:

When using Jetstream's Livewire install and having the fortify email verification disabled, browsing to a user profile of a user not verified will result in a Middleware error.

Illuminate\Contracts\Container\BindingResolutionException Target class [verified] does not exist. Illuminate\Container\Container::build vendor/laravel/framework/src/Illuminate/Container/Container.php:811

I experienced the same issue with the dashboard until I removed the Middleware the route injected into my web.php routes file.

Since the user profile route is a part of a Jetstream routes file, the Middleware can not be removed, and does not respect the fortify options.

Steps To Reproduce:

For context, I installed Jetstream into an existing app with the goal of replacing the frontend with the Livewire boilerplate, and Tailwind UI components.

php artisan jetstream:install livewire
php artisan migrate
good-system commented 4 years ago

I haven't encountered this issue but the latest Laravel version is 8.0.1

taylorotwell commented 4 years ago

Most likely your User implements MustVerifyEmail... remove that.

georanma commented 4 years ago

Yes, I now see where Illuminate\Foundation\Auth\User includes MustVerifyEmail.

On Fri, Sep 18, 2020 at 8:37 AM Taylor Otwell notifications@github.com wrote:

Most likely your User implements MustVerifyEmail... remove that.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/laravel/jetstream/issues/199#issuecomment-694842061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD3E4CQXOQPEQZJF45IMPALSGNH7HANCNFSM4RMD52GA .

srakl commented 7 months ago

im having the same issue. when i run php artisan route:list i get this error on console

  Class "verified" does not exist

  at vendor/laravel/framework/src/Illuminate/Foundation/Console/RouteListCommand.php:225
    221▕             if ($this->isFrameworkController($route)) {
    222▕                 return false;
    223▕             }
    224▕ 
  ➜ 225▕             $path = (new ReflectionClass($route->getControllerClass()))
    226▕                                 ->getFileName();
    227▕         } else {
    228▕             return false;
    229▕         }

      +3 vendor frames 

  4   [internal]:0
      Illuminate\Foundation\Console\RouteListCommand::Illuminate\Foundation\Console\{closure}(Object(Illuminate\Routing\Route))
      +16 vendor frames 

  21  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))

i tried removing MustVerifyEmail here class User extends Authenticatable implements MustVerifyEmail but still no luck. any ideas?