mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-04-27 15:57:04 +03:00
Made it possible to pre-fill login via url
Allows email to be passed to email field. Also allows password only if in demo mode (Due to security concerns).
This commit is contained in:
parent
3ed5426315
commit
03eb63ec77
@ -102,12 +102,21 @@ class LoginController extends Controller
|
||||
|
||||
/**
|
||||
* Show the application login form.
|
||||
* @param Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function getLogin()
|
||||
public function getLogin(Request $request)
|
||||
{
|
||||
$socialDrivers = $this->socialAuthService->getActiveDrivers();
|
||||
$authMethod = config('auth.method');
|
||||
|
||||
if ($request->has('email')) {
|
||||
session()->flashInput([
|
||||
'email' => $request->get('email'),
|
||||
'password' => (config('app.env') === 'demo') ? $request->get('password', '') : ''
|
||||
]);
|
||||
}
|
||||
|
||||
return view('auth/login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user