Download the PHP package r/u2f-two-factor-bundle without Composer
On this page you can find all versions of the php package r/u2f-two-factor-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download r/u2f-two-factor-bundle
More information about r/u2f-two-factor-bundle
Files in r/u2f-two-factor-bundle
Package u2f-two-factor-bundle
Short Description Use U2F-Keys as 2FA for Symfony2, using scheb/two-factor-bundle
License MIT
Homepage https://github.com/darookee/u2f-two-factor-bundle
Informations about the package u2f-two-factor-bundle
r/u2f-two-factor-bundle
This Symfony2 bundle provides u2f authentication for your website using scheb/two-factor-bundle.
Installation
Step 1: Download using Composer
Step 2: Enable the bundles (skip when using Symfony Flex)
Add this to you app/AppKernel.php
:
Step 3: Configure
These options are available but not required:
For the Authentication to work you User has to implement R\U2FTwoFactorBundle\Model\U2F\TwoFactorInterface
For the Registration you also need an entity that implements
R\U2FTwoFactorBundle\Model\U2F\TwoFactorKeyInterface
.
Here is an example using doctrine.
Then you need to create an event subscriber to get and store the data of the registered key.
Also add routing definitions to your app/config/routing.yml
The Keys can be registered visiting /u2f_register
. It needs to be served as
https!
Step 4: Include Javascript
First you need to add the dependency u2f-api to your package.json
.
If you're using Webpack Encore, include this line in your webpack.config.js
and you're done:
If you're not using Webpack Encore, you need to bundle web/bundles/ru2ftwofactor/js/auth.js
yourself, overwrite formTemplate
and registerTemplate
and add your JavaScript reference there.
License
This bundle is available under the MIT license.
All versions of u2f-two-factor-bundle with dependencies
ext-json Version *
doctrine/common Version *
scheb/two-factor-bundle Version ^3.2.0|^4.0.0
yubico/u2flib-server Version ^1.0.0
symfony/framework-bundle Version ^3.4|^4.0|^5.0
symfony/templating Version ^3.4|^4.0|^5.0
doctrine/collections Version ^1.6
symfony/event-dispatcher-contracts Version ^2.0