generated from biigle/module
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP implement login and register button
- Loading branch information
Showing
6 changed files
with
64 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
namespace Biigle\Modules\AuthLSLogin\Http\Controllers; | ||
|
||
use Biigle\Http\Controllers\Controller; | ||
use Laravel\Socialite\Facades\Socialite; | ||
|
||
class LSLoginController extends Controller | ||
{ | ||
/** | ||
* Redirect to the authentication provider | ||
* | ||
* @return mixed | ||
*/ | ||
public function redirect() | ||
{ | ||
return Socialite::driver('lifesciencelogin')->redirect(); | ||
} | ||
|
||
/** | ||
* Handle the authentication response | ||
* | ||
* @return mixed | ||
*/ | ||
public function callback() | ||
{ | ||
$user = Socialite::driver('lifesciencelogin')->user(); | ||
|
||
//... | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
<?php | ||
|
||
// $router->get('quotes', [ | ||
// 'middleware' => 'auth', | ||
// 'as' => 'quotes', | ||
// 'uses' => 'QuotesController@index', | ||
// ]); | ||
$router->get('auth/lslogin/redirect', [ | ||
'as' => 'lslogin-redirect', | ||
'uses' => 'LSLoginController@redirect', | ||
]); | ||
|
||
// $router->get('quotes/new', [ | ||
// 'middleware' => 'auth', | ||
// 'uses' => 'QuotesController@quote', | ||
// ]); | ||
$router->get('auth/lslogin/callback', [ | ||
'as' => 'lslogin-callback', | ||
'uses' => 'LSLoginController@callback', | ||
]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a style="display: block; text-align: center;" href="{{ route('lslogin-redirect') }}" title="Log in via Life Science Login"> | ||
<img style="height: 34px" src="{{ cachebust_asset('vendor/auth-lslogin/login-grey-wide.png') }}"> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<a style="display: block; text-align: center;" href="{{ route('lslogin-redirect') }}" title="Sign up via Life Science Login"> | ||
<img style="height: 34px" src="{{ cachebust_asset('vendor/auth-lslogin/login-grey-wide.png') }}"> | ||
</a> |