Route::get('auth/redirect/{driver}', [SocialiteController::class, 'redirect'])->name('socialite'); Route::get('auth/callback/{driver}', [SocialiteController::class, 'callback']); When a user visits the first route, the user will be redirected to Google/GitHub.