Skip to content

Kirby 4.5.0

$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' Purpose of the code

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