Showing
3 changed files
with
3 additions
and
3 deletions
| ... | @@ -2,6 +2,7 @@ | ... | @@ -2,6 +2,7 @@ |
| 2 | 2 | ||
| 3 | namespace BookStack\Http\Controllers\Auth; | 3 | namespace BookStack\Http\Controllers\Auth; |
| 4 | 4 | ||
| 5 | +use BookStack\Exceptions\AuthException; | ||
| 5 | use BookStack\Http\Controllers\Controller; | 6 | use BookStack\Http\Controllers\Controller; |
| 6 | use BookStack\Repos\UserRepo; | 7 | use BookStack\Repos\UserRepo; |
| 7 | use BookStack\Services\SocialAuthService; | 8 | use BookStack\Services\SocialAuthService; | ... | ... |
| ... | @@ -51,7 +51,7 @@ class RegisterController extends Controller | ... | @@ -51,7 +51,7 @@ class RegisterController extends Controller |
| 51 | */ | 51 | */ |
| 52 | public function __construct(SocialAuthService $socialAuthService, EmailConfirmationService $emailConfirmationService, UserRepo $userRepo) | 52 | public function __construct(SocialAuthService $socialAuthService, EmailConfirmationService $emailConfirmationService, UserRepo $userRepo) |
| 53 | { | 53 | { |
| 54 | - $this->middleware('guest'); | 54 | + $this->middleware('guest')->except(['socialCallback', 'detachSocialAccount']); |
| 55 | $this->socialAuthService = $socialAuthService; | 55 | $this->socialAuthService = $socialAuthService; |
| 56 | $this->emailConfirmationService = $emailConfirmationService; | 56 | $this->emailConfirmationService = $emailConfirmationService; |
| 57 | $this->userRepo = $userRepo; | 57 | $this->userRepo = $userRepo; |
| ... | @@ -297,5 +297,4 @@ class RegisterController extends Controller | ... | @@ -297,5 +297,4 @@ class RegisterController extends Controller |
| 297 | return $this->registerUser($userData, $socialAccount); | 297 | return $this->registerUser($userData, $socialAccount); |
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | - | ||
| 301 | } | 300 | } |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -153,7 +153,7 @@ Route::group(['middleware' => 'auth'], function () { | ... | @@ -153,7 +153,7 @@ Route::group(['middleware' => 'auth'], function () { |
| 153 | }); | 153 | }); |
| 154 | 154 | ||
| 155 | // Social auth routes | 155 | // Social auth routes |
| 156 | -Route::get('/login/service/{socialDriver}', 'Auth\RegisterController@getSocialLogin'); | 156 | +Route::get('/login/service/{socialDriver}', 'Auth\LoginController@getSocialLogin'); |
| 157 | Route::get('/login/service/{socialDriver}/callback', 'Auth\RegisterController@socialCallback'); | 157 | Route::get('/login/service/{socialDriver}/callback', 'Auth\RegisterController@socialCallback'); |
| 158 | Route::get('/login/service/{socialDriver}/detach', 'Auth\RegisterController@detachSocialAccount'); | 158 | Route::get('/login/service/{socialDriver}/detach', 'Auth\RegisterController@detachSocialAccount'); |
| 159 | Route::get('/register/service/{socialDriver}', 'Auth\RegisterController@socialRegister'); | 159 | Route::get('/register/service/{socialDriver}', 'Auth\RegisterController@socialRegister'); | ... | ... |
-
Please register or sign in to post a comment