Move isDemoApp to a new 2FAuth config file

This commit is contained in:
Bubka 2021-10-01 13:34:28 +02:00
parent 350d00902e
commit 77cf15cf5e
4 changed files with 11 additions and 3 deletions

View File

@ -39,7 +39,7 @@ public function __construct()
*/
public function handle()
{
if( !config('app.options.isDemoApp') ) {
if( !config('2fauth.config.isDemoApp') ) {
$this->comment('2fauth:reset-demo can only run when isDemoApp option is On');
return;
}

View File

@ -17,7 +17,7 @@ class AvoidPasswordResetInDemo
public function handle($request, Closure $next)
{
if( config('app.options.isDemoApp') ) {
if( config('2fauth.config.isDemoApp') ) {
return response()->json(['requestFailed' => __('auth.forms.no_reset_password_in_demo')], Response::HTTP_UNAUTHORIZED);
}

9
config/2fauth.php Normal file
View File

@ -0,0 +1,9 @@
<?php
return [
'config' => [
'isDemoApp' => env('IS_DEMO_APP', false),
],
];

View File

@ -32,7 +32,6 @@
*/
'options' => [
'isDemoApp' => env('IS_DEMO_APP', false),
'showTokenAsDot' => false,
'closeTokenOnCopy' => false,
'useBasicQrcodeReader' => false,