Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Зуев Егор
/
wiki.dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Authored by
Dan Brown
2016-11-27 19:11:15 +0000
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Commit
c403d057551699fdda7508da4d7c24a2ad90f12a
c403d057
1 parent
0fb1fc87
Fixed social login routes
Fixes #239
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
app/Http/Controllers/Auth/LoginController.php
app/Http/Controllers/Auth/RegisterController.php
routes/web.php
app/Http/Controllers/Auth/LoginController.php
View file @
c403d05
...
...
@@ -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
;
...
...
app/Http/Controllers/Auth/RegisterController.php
View file @
c403d05
...
...
@@ -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
...
...
routes/web.php
View file @
c403d05
...
...
@@ -153,7 +153,7 @@ Route::group(['middleware' => 'auth'], function () {
});
// Social auth routes
Route
::
get
(
'/login/service/{socialDriver}'
,
'Auth\
Register
Controller@getSocialLogin'
);
Route
::
get
(
'/login/service/{socialDriver}'
,
'Auth\
Login
Controller@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'
);
...
...
Please
register
or
sign in
to post a comment