[Auth] refact!: Remove legacy auth challenges support#8044
Merged
bastianallgeier merged 1 commit intov6/refact/authfrom Apr 15, 2026
Merged
[Auth] refact!: Remove legacy auth challenges support#8044bastianallgeier merged 1 commit intov6/refact/authfrom
bastianallgeier merged 1 commit intov6/refact/authfrom
Conversation
b38fd5f to
c6c404c
Compare
c6c404c to
fe5c71e
Compare
92c09f4 to
e033c5e
Compare
BREAKING CHANGE: Custom auth challenges extending `Kirby\Cms\Auth\Challenge` have to be adapted to use `Kirby\Auth\Challenge`
e033c5e to
e67ecd2
Compare
bastianallgeier
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Working on the frontend (login view) for the auth refactoring, it has become quite apparent to me how difficult it is to support old aunt challenges here. It's just a lot of wrappers and shortcomings. Which is why I propose to already do the breaking change directly in Kirby 6.
Changelog
🚨 Breaking changes
Kirby\Cms\Auth\Challengehave to be adapted to useKirby\Auth\ChallengeDocs
Kirby 6 redesigns auth challenges around a new
Kirby\Auth\Challengebase class with instance methods and aPendingdata object. The Kirby 5 base class (Kirby\Cms\Auth\Challenge) used static methods and a different return convention. Any Kirby plugin that provides a customauthChallengesextension and was written for Kirby 5, extendingKirby\Cms\Auth\Challengeor any of its subclassesKirby\Cms\Auth\EmailChallengeorKirby\Cms\Auth\TotpChallengeneed to be adapted.In Kirby 5
In Kirby 6
Plugin registration is unchanged:
The
PendingobjectPendingcarries two optional slots:For most challenges you only need
secret. Usepublicwhen you want to pass display information to the Panel (e.g. masked phone number for UI display).TOTP / app-based challenges (no code returned from
create)If your challenge generates no code itself (the user's app does), return
nullfromcreate()and do all verification inverify():For review team