mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-24 16:09:14 +01:00
Move isDemoApp to a new 2FAuth config file
This commit is contained in:
parent
350d00902e
commit
77cf15cf5e
@ -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;
|
||||
}
|
||||
|
@ -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
9
config/2fauth.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
'config' => [
|
||||
'isDemoApp' => env('IS_DEMO_APP', false),
|
||||
],
|
||||
|
||||
];
|
@ -32,7 +32,6 @@
|
||||
*/
|
||||
|
||||
'options' => [
|
||||
'isDemoApp' => env('IS_DEMO_APP', false),
|
||||
'showTokenAsDot' => false,
|
||||
'closeTokenOnCopy' => false,
|
||||
'useBasicQrcodeReader' => false,
|
||||
|
Loading…
Reference in New Issue
Block a user