Update Composer packages
This commit is contained in:
parent
0320235f6c
commit
a8b68fb61b
378 changed files with 28466 additions and 28852 deletions
|
@ -70,13 +70,11 @@ return [
|
|||
$user = $auth->login($email, $password, $long);
|
||||
}
|
||||
} else {
|
||||
if (isset($methods['code']) === true) {
|
||||
$mode = 'login';
|
||||
} elseif (isset($methods['password-reset']) === true) {
|
||||
$mode = 'password-reset';
|
||||
} else {
|
||||
throw new InvalidArgumentException('Login without password is not enabled');
|
||||
}
|
||||
$mode = match (true) {
|
||||
isset($methods['code']) => 'login',
|
||||
isset($methods['password-reset']) => 'password-reset',
|
||||
default => throw new InvalidArgumentException('Login without password is not enabled')
|
||||
};
|
||||
|
||||
$status = $auth->createChallenge($email, $long, $mode);
|
||||
}
|
||||
|
@ -87,13 +85,13 @@ return [
|
|||
'status' => 'ok',
|
||||
'user' => $this->resolve($user)->view('auth')->toArray()
|
||||
];
|
||||
} else {
|
||||
return [
|
||||
'code' => 200,
|
||||
'status' => 'ok',
|
||||
'challenge' => $status->challenge()
|
||||
];
|
||||
}
|
||||
|
||||
return [
|
||||
'code' => 200,
|
||||
'status' => 'ok',
|
||||
'challenge' => $status->challenge()
|
||||
];
|
||||
}
|
||||
],
|
||||
[
|
||||
|
@ -105,4 +103,14 @@ return [
|
|||
return true;
|
||||
}
|
||||
],
|
||||
[
|
||||
'pattern' => 'auth/ping',
|
||||
'method' => 'POST',
|
||||
'auth' => false,
|
||||
'action' => function () {
|
||||
// refresh the session timeout
|
||||
$this->kirby()->session();
|
||||
return true;
|
||||
}
|
||||
],
|
||||
];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue