Skip to content

AnalogRepublic/nova-duo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version on Packagist Total Downloads

Nova Duo

Laravel Nova Duo multi factor authentication.

Install the package

composer require analogrepublic/nova-duo

  1. Publish config

php artisan vendor:publish --provider="AnalogRepublic\NovaDuo\ToolServiceProvider"

Change configs as your needs


return [

    'enabled' => env('NOVA_DUO_ENABLED', true),

    'duo' => [
        'client_id' => env('NOVA_DUO_CLIENT_ID'),
        'client_secret' => env('NOVA_DUO_CLIENT_SECRET'),
        'api_hostname' => env('NOVA_DUO_API_HOSTNAME'),
    ]

];


  1. Add Nova Duo middleware to Nova config file
/*
    |--------------------------------------------------------------------------
    | Nova Route Middleware
    |--------------------------------------------------------------------------
    |
    | These middleware will be assigned to every Nova route, giving you the
    | chance to add your own middleware to this stack or override any of
    | the existing middleware. Or, you can just stick with this stack.
    |
    */

    'middleware' => [
        ...
        \AnalogRepublic\NovaDuo\Http\Middleware\TwoFa::class
    ],

  1. Register Nova Duo tool in Nova Service Provider
<?php

class NovaServiceProvider extends NovaApplicationServiceProvider{

public function tools()
    {
        return [
            ...
            new \AnalogRepublic\NovaDuo\NovaDuo()

        ];
    }

}


  1. You are done !

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages