title: Unable to redirect after a user registers in Laravel Jetstream
body: <p>I am successfully able to redirect whenever a user logs in. I am using the Login Response method. But when I am trying to do the same thing for the user when a user registers, it shows the URL in the browser, but I need to refresh to view the page to make it load. Something weird thing is happening here.</p>
  <p>Following the below approach:
  <a href="https://talltips.novate.co.uk/laravel/laravel-8-conditional-login-redirects" rel="nofollow noreferrer">https://talltips.novate.co.uk/laravel/laravel-8-conditional-login-redirects</a>
  To understand the problem, please check the gif below. Login Response is working the way I expected, but Register Response is not working; it is behaving weirdly.</p>
  <p><strong>Login Response</strong></p>
  <p><img src="https://user-images.githubusercontent.com/65024122/102459113-33393e80-406b-11eb-810d-0905e1fa9962.gif" alt="Login Response" /></p>
  <p><strong>Register Response</strong></p>
  <p><img src="https://user-images.githubusercontent.com/65024122/102459115-33d1d500-406b-11eb-807c-b728cee3ca1a.gif" alt="Register Response" /></p>
  <p><strong>LoginResponse.php</strong></p>
  <pre class="lang-php prettyprint-override"><code>namespace App\Http\Responses;
  
  use Illuminate\Support\Facades\Auth;
  use Laravel\Fortify\Contracts\LoginResponse as LoginResponseContract;
  
  class LoginResponse implements LoginResponseContract
  {
      public function toResponse($request)
      {
          if (Auth::user()-&gt;hasAnyRoles(['Administrator', 'Employee'])) {
              return redirect()-&gt;route('backend.dashboard');
          }
  
          return redirect()-&gt;route('frontend.dashboard');
      }
  }
  </code></pre>
  <p><strong>RegisterResponse.php</strong></p>
  <pre><code>&lt;?php
  
  namespace App\Http\Responses;
  
  use Illuminate\Support\Facades\Auth;
  use Laravel\Fortify\Contracts\RegisterResponse as RegisterResponseContract;
  
  class RegisterResponse implements RegisterResponseContract
  {
  
      public function toResponse($request)
      {
          if(Auth::user()-&gt;hasAnyRoles(['Administrator', 'Employee'])) {
              return redirect()-&gt;route('backend.dashboard');
          }
  
          return redirect()-&gt;route('frontend.dashboard');
      }
  
  }
  </code></pre>
  <p><strong>JetstreamServiceProvider.php</strong></p>
  <pre><code>public function boot() {
      $this - &gt; configurePermissions();
  
      Jetstream::deleteUsersUsing(DeleteUser::class);
  
      // Register New LoginResponse
      $this - &gt; app - &gt; singleton(
          \Laravel\ Fortify\ Contracts\ LoginResponse::class,
          \App\ Http\ Responses\ LoginResponse::class);
  
      // Register New RegisterResponse
      $this - &gt; app - &gt; singleton(
          \Laravel\ Fortify\ Contracts\ RegisterResponse::class,
                  \App\ Http\ Responses\ RegisterResponse::class);
  }
  </code></pre>
  <p><strong>AuthServiceProvider.php</strong></p>
  <pre><code>public function boot() {
      $this - &gt; registerPolicies();
  
      Gate::define('access-backend', function($user) {
          return $user - &gt; hasAnyRoles(['Administrator', 'Employee']);
      });
  
      Gate::define('access-frontend', function($user) {
          return $user - &gt; hasRole('Client');
      });
  }
  </code></pre>
  <p><strong>Web.php</strong></p>
  <pre class="lang-php prettyprint-override"><code>Route::middleware(['auth:sanctum', 'verified'])-&gt;group(function () {
      \
      Route::prefix('backend')-&gt;name('backend.')-&gt;middleware(['can:access-backend'])-&gt;group(function () {
              Route::get('/dashboard', \App\Http\Livewire\Backend\Dashboard::class)-&gt;name('dashboard');
          });
      Route::prefix('frontend')-&gt;name('frontend.')-&gt;middleware(['can:access-frontend'])-&gt;group(function () {
          Route::get('/dashboard', \App\Http\Livewire\Frontend\Dashboard::class)-&gt;name('dashboard');
      });
  });
  </code></pre>