]> BookStack Code Mirror - bookstack/commitdiff
Fixed social login routes
authorDan Brown <redacted>
Sun, 27 Nov 2016 19:11:15 +0000 (19:11 +0000)
committerDan Brown <redacted>
Sun, 27 Nov 2016 19:11:15 +0000 (19:11 +0000)
Fixes #239

app/Http/Controllers/Auth/LoginController.php
app/Http/Controllers/Auth/RegisterController.php
routes/web.php

index 0de4a8282b9d61e0f9ffabe75093446996e6c7e0..c9d6a5496ef8c99d3f2fd80feaa835641d22ec34 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace BookStack\Http\Controllers\Auth;
 
+use BookStack\Exceptions\AuthException;
 use BookStack\Http\Controllers\Controller;
 use BookStack\Repos\UserRepo;
 use BookStack\Services\SocialAuthService;
index 6bba6de045f8d371e3f5b5d92d59b093ddd90df5..d9bb500b448cdbfa230c614b414a7b8f5332f247 100644 (file)
@@ -51,7 +51,7 @@ class RegisterController extends Controller
      */
     public function __construct(SocialAuthService $socialAuthService, EmailConfirmationService $emailConfirmationService, UserRepo $userRepo)
     {
-        $this->middleware('guest');
+        $this->middleware('guest')->except(['socialCallback', 'detachSocialAccount']);
         $this->socialAuthService = $socialAuthService;
         $this->emailConfirmationService = $emailConfirmationService;
         $this->userRepo = $userRepo;
@@ -297,5 +297,4 @@ class RegisterController extends Controller
         return $this->registerUser($userData, $socialAccount);
     }
 
-
 }
\ No newline at end of file
index 28e6dccb17609ad3af5a804fb06a3460f0d0714b..d179c28a52d2671a8a36b9ff437e1ed4e3d843a5 100644 (file)
@@ -153,7 +153,7 @@ Route::group(['middleware' => 'auth'], function () {
 });
 
 // Social auth routes
-Route::get('/login/service/{socialDriver}', 'Auth\RegisterController@getSocialLogin');
+Route::get('/login/service/{socialDriver}', 'Auth\LoginController@getSocialLogin');
 Route::get('/login/service/{socialDriver}/callback', 'Auth\RegisterController@socialCallback');
 Route::get('/login/service/{socialDriver}/detach', 'Auth\RegisterController@detachSocialAccount');
 Route::get('/register/service/{socialDriver}', 'Auth\RegisterController@socialRegister');
Morty Proxy This is a proxified and sanitized view of the page, visit original site.