├── .gitignore ├── src ├── Facades │ └── Authy.php ├── Contracts │ └── Auth │ │ └── TwoFactor │ │ ├── SMSToken.php │ │ ├── PhoneToken.php │ │ ├── Authenticatable.php │ │ └── Provider.php ├── AuthyFacadeAccessor.php ├── Providers │ └── AuthyServiceProvider.php ├── Auth │ └── TwoFactor │ │ └── Authenticatable.php └── Services │ └── Authy.php ├── config └── config.php ├── composer.json ├── migrations └── migration.php ├── views └── form.blade.php └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | /bootstrap/compiled.php 2 | .env.*.php 3 | .env.php 4 | .env 5 | /vendor 6 | composer.lock 7 | /.idea 8 | -------------------------------------------------------------------------------- /src/Facades/Authy.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | return [ 10 | 'mode' => env('AUTHY_MODE', 'live'), // Can be either 'live' or 'sandbox'. If empty or invalid 'live' will be used 11 | 'sandbox' => [ 12 | 'key' => env('AUTHY_TEST_KEY', ''), 13 | ], 14 | 'live' => [ 15 | 'key' => env('AUTHY_LIVE_KEY', ''), 16 | ], 17 | 'sms' => env('AUTHY_SEND_SMS', false), 18 | ]; 19 | -------------------------------------------------------------------------------- /src/Contracts/Auth/TwoFactor/SMSToken.php: -------------------------------------------------------------------------------- 1 | string('phone_country_code')->nullable(); 18 | $table->string('phone_number')->nullable(); 19 | $table->text('two_factor_options')->nullable(); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::table('users', function (Blueprint $table) { 31 | $table->dropColumn([ 32 | 'phone_country_code', 33 | 'phone_number', 34 | 'two_factor_options', 35 | ]); 36 | }); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/AuthyFacadeAccessor.php: -------------------------------------------------------------------------------- 1 | 3 | 4 | @endsection 5 | 6 |
Validate your two-factor authentication token
216 | 240 |