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

Latest commit

History

History
83 lines (56 loc) 路 1.78 KB

installation.md

File metadata and controls

83 lines (56 loc) 路 1.78 KB

Installation

Prerequisites

This bundle requires Symfony >= 2.6 (3.x.x and 4.x.x).

The off-the-shelf version of the bundle is compatible with standard user/password authentication. If your system is not using this, you will have to configure a security token class for your authentication methods.

If you're using anything other than Doctrine ORM to manage the User Entity you will have to implement a persister service.

If you're using Symfony 4, you must install templating package:

php composer.phar require templating

and configure it with your favorite engine:

framework:
    templating:
        engines: twig

Installation

Step 1: Download using Composer

Add this bundle via Composer:

php composer.phar require scheb/two-factor-bundle

When being asked for the version, use the latest stable release or any different version you want.

Alternatively you can also add the bundle directly to composer.json:

{
    "require": {
        "scheb/two-factor-bundle": "~1.0"
    }
}

and then tell Composer to install the bundle:

php composer.phar update scheb/two-factor-bundle

Step 2: Enable the bundle

Enable this bundle in your app/AppKernel.php:

public function registerBundles()
{
    $bundles = array(
        // ...
        new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
    );
}

If you're using Symfony >= 4 you have to edit config/bundles.php:

return [
	// ...
    Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
];

Step 3: Configure

Next you'll want probably want to configure the bundle.

For more specific configuration information, see Google Authenticator or Email.