Skip to content
This repository was archived by the owner on Dec 2, 2021. It is now read-only.

Commit 559b596

Browse files
committed
Info on how to flag a device as "trusted"
1 parent 2a1906e commit 559b596

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Resources/doc/trusted_device.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,23 @@ class User implements TrustedDeviceInterface
5050

5151
If not implemented, the bundle is defaulting to version `0`.
5252

53+
## Flagging a device as "trusted"
54+
55+
To flag a device as "trusted", in the last step of the 2fa process, you have to pass a parameter `_trusted` with a
56+
`true`-like value. The parameter name can be changed in the firewall configuration:
57+
58+
```yaml
59+
security:
60+
firewalls:
61+
yourFirewallName:
62+
# ...
63+
two_factor:
64+
trusted_parameter_name: _trusted # Name of the parameter for the trusted device option
65+
```
66+
67+
Please have a look at the [default authentication form template](https://github.com/scheb/two-factor-bundle/blob/4.x/Resources/views/Authentication/form.html.twig#L38-L40)
68+
how it's implemented.
69+
5370
## Custom trusted device manager
5471

5572
If you don't like the way this is implemented, you can also have your own trusted device manager. Create a service

0 commit comments

Comments
 (0)