File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
docs/references/authentication Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -57,10 +57,12 @@ public $views = [
5757## Defining New Actions
5858
5959While the provided email-based activation and 2FA will work for many sites, others will have different
60- needs, like using SMS to verify or something completely different. Actions have only one requirement:
61- they must implement ` CodeIgniter\Shield\Authentication\Actions\ActionInterface ` .
60+ needs, like using SMS to verify or something completely different. Custom actions must adhere to the following requirements:
6261
63- The interface defines three methods for ` ActionController ` :
62+ 1 . The class name for a "register" action must end with the suffix ` Activator ` (e.g., ` SMSActivator ` ) to ensure consistency.
63+ 2 . All custom actions must implement the ` CodeIgniter\Shield\Authentication\Actions\ActionInterface ` .
64+
65+ The ` ActionInterface ` defines three required methods that must be implemented to ensure the action integrates properly with the ` ActionController ` .
6466
6567** show()** should display the initial page the user lands on immediately after the authentication task,
6668like login. It will typically display instructions to the user and provide an action to take, like
@@ -76,4 +78,4 @@ and provides feedback. In the `Email2FA` class, it verifies the code against wha
7678database and either sends them back to the previous form to try again or redirects the user to the
7779page that a ` login ` task would have redirected them to anyway.
7880
79- All methods should return either a ` Response ` or a view string (e.g. using the ` view() ` function).
81+ All methods should return either a ` Response ` or a view string (e.g. using the ` view() ` function).
You can’t perform that action at this time.
0 commit comments