Skip to content

Kirby 3.9.8

$auth->createChallenge()

Creates an authentication challenge (one-time auth code)

$auth->createChallenge(string $email, bool $long = false, string $mode = 'login'): Kirby\Cms\Auth\Status

Parameters

Name Type Default Description
$email * string
$long bool false If true, a long session will be created
$mode string 'login' Either 'login' or 'password-reset'

Return type

Kirby\Cms\Auth\Status

Exceptions

Type Description
Kirby\Exception\LogicException If there is no suitable authentication challenge (only in debug mode)
Kirby\Exception\NotFoundException If the user does not exist (only in debug mode)
Kirby\Exception\PermissionException If the rate limit is exceeded

Parent class

Kirby\Cms\Auth