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
*`tokenLifeTime`: 60 minutes by default. You can set how many seconds you want your token to be valid.
24
+
*`DelveryHandlers`: Email delivery is included but it can be easily extended implementing `\CakeDC\Users\Model\Behavior\OneTimeDelivery\DeliveryInterface` (i.e SmsDelivery, PushDelivery, etc)
25
+
26
+
Enabling
27
+
--------
28
+
29
+
The feature is enabled by default but you can disable it application-wide and enable via Middleware (or any other way) for specific situations using:
30
+
31
+
```php
32
+
Configure::write('OneTimeLogin.enabled', true),
33
+
```
34
+
35
+
Disabling
36
+
---------
37
+
You can disable it by adding this in your config/users.php file:
38
+
39
+
```php
40
+
'OneTimeLogin.enabled' => false,
41
+
```
42
+
43
+
How does it work
44
+
----------------
45
+
When the user access the login page, there is a new button `Send me a login link`. On click, the user will be redirected to a page to enter his email address. Once it is submitted, the user will receive an email with the link to automatically login.
46
+
47
+
Two-factor authentication
48
+
----------------
49
+
The two-factor authentication is skipped by default for this feature since the user must actively click on a link sent to his email address.
50
+
51
+
If you want to enable it by adding this in your config/users.php file:
ReCaptcha will be added automatically to the request login link form if `Users.reCaptcha.login` is enabled. We strongly recommend having ReCaptcha enabled, because it's a public form that could be targeted by an attacker to send multiple requests.
0 commit comments