PHPackages                             raditzfarhan/laravel-user-security - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Security](/categories/security)
4. /
5. raditzfarhan/laravel-user-security

ActiveLaravel-package[Security](/categories/security)

raditzfarhan/laravel-user-security
==================================

Add security pin, mnemonic key and 2fa authentication feature to users.

v1.0.0(6y ago)47081MITPHP

Since Apr 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/raditzfarhan/laravel-user-security)[ Packagist](https://packagist.org/packages/raditzfarhan/laravel-user-security)[ RSS](/packages/raditzfarhan-laravel-user-security/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (3)Used By (0)

 [![License](https://camo.githubusercontent.com/1b01ef0024ba0866c115986b895301f657c1b21fc29f05c4844b7f2e8d89204d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e7376673f7374796c653d666c61742d737175617265)](https://github.com/raditzfarhan/laravel-user-security) [![styleci](https://camo.githubusercontent.com/3ebb9759d3748ad0fa1b6c7f477c842a04b4bdc799f75a8b68f3c6d585d07be8/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f373534383938362f736869656c643f7374796c653d737175617265)](https://github.com/raditzfarhan/laravel-user-security)

Laravel User Security - RFAuthenticator
=======================================

[](#laravel-user-security---rfauthenticator)

Add security pin, mnemonic key and 2fa authentication feature to users.

Installation
------------

[](#installation)

Via Composer

```
$ composer require raditzfarhan/laravel-user-security:^1.0
```

Configuration
-------------

[](#configuration)

The Laravel and Lumen configurations vary slightly, so here are the instructions for each of the frameworks.

### Laravel

[](#laravel)

Edit the `config/app.php` file and add the following line to register the service provider:

```
'providers' => [
    ...
    RaditzFarhan\UserSecurity\UserSecurityServiceProvider::class,
    ...
],
```

> Tip: If you're on Laravel version **5.5** or higher, you can skip this part of the setup in favour of the Auto-Discovery feature.

### Lumen

[](#lumen)

Edit the `bootstrap/app.php` file and add the following line to register the service provider:

```
...
$app->register(RaditzFarhan\UserSecurity\UserSecurityServiceProvider::class);
...
```

You will also need to enable `Facades` in `bootstrap/app.php`:

```
..
$app->withFacades(true, [
    ...
    RaditzFarhan\UserSecurity\Facades\RFAuthenticator::class => 'RFAuthenticator'
]);
...
```

Open your user provider model class, for example `App\User`, and add `RaditzFarhan\UserSecurity\Traits\UserSecurable` trait:

```
