Skip to content


Verifies an authentication code that was requested with the createChallenge() method; if successful, the user is automatically logged in

$auth->verifyChallenge(string $code): Kirby\Cms\User


Name Type Default Description
$code * string User-provided auth code to verify

Return type



Type Description
Kirby\Exception\PermissionException If the rate limit was exceeded, the challenge timed out, the code
is incorrect or if any other error occured with debug mode off
Kirby\Exception\NotFoundException If the user from the challenge doesn't exist
Kirby\Exception\InvalidArgumentException If no authentication challenge is active
Kirby\Exception\LogicException If the authentication challenge is invalid

Parent class