You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/customization/extending_controllers.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,7 @@
1
1
# Extending the Controllers
2
2
3
+
## Provided Controllers
4
+
3
5
Shield has the following controllers that can be extended to handle
4
6
various parts of the authentication process:
5
7
@@ -9,6 +11,8 @@ various parts of the authentication process:
9
11
-**MagicLinkController** handles the "lost password" process that allows a user to login with a link sent to their email. This allows you to
10
12
override the message that is displayed to a user to describe what is happening, if you'd like to provide more information than simply swapping out the view used.
11
13
14
+
## How to Extend
15
+
12
16
It is not recommended to copy the entire controller into **app/Controllers** and change its namespace. Instead, you should create a new controller that extends
13
17
the existing controller and then only override the methods needed. This allows the other methods to stay up to date with any security
14
18
updates that might happen in the controllers.
@@ -29,3 +33,5 @@ class LoginController extends ShieldLogin
29
33
}
30
34
}
31
35
```
36
+
37
+
After extending, don't forget to change the route. See [Customizing Routes](./route_config.md).
0 commit comments