From 89230c8b5a01bead34bebd2a5844fd227e2e8f76 Mon Sep 17 00:00:00 2001 From: gvenuto Date: Fri, 13 Feb 2026 20:35:28 -0300 Subject: [PATCH] Update index.rst with authentication example Added authentication configuration example for version 4.0.0. --- docs/en/index.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/en/index.rst b/docs/en/index.rst index 01f22317..6f745bf2 100644 --- a/docs/en/index.rst +++ b/docs/en/index.rst @@ -116,6 +116,27 @@ define the ``AuthenticationService`` it wants to use. Add the following method t ]), ]); + + // For Authentication version: * 4.0.0 + $fields = [ + 'username' => 'email', + 'password' => 'password', + ]; + + $service->loadAuthenticator('Authentication.Form', [ + 'identifier' => [ + 'className' => 'Authentication.Password', + 'fields' => $fields, + ], + 'loginUrl' => Router::url([ + 'prefix' => false, + 'plugin' => null, + 'controller' => 'Users', + 'action' => 'login', + ]), + ]); + + return $service; }