mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-08-09 13:55:01 +02:00
Move G-Auth import logic from controller to service
This commit is contained in:
@ -60,6 +60,11 @@ class Handler extends ExceptionHandler
|
||||
'message' => $exception->getMessage()], 400);
|
||||
});
|
||||
|
||||
$this->renderable(function (InvalidGoogleAuthMigration $exception, $request) {
|
||||
return response()->json([
|
||||
'message' => __('errors.invalid_google_auth_migration')], 400);
|
||||
});
|
||||
|
||||
$this->renderable(function (\Illuminate\Auth\AuthenticationException $exception, $request) {
|
||||
if ($exception->guards() === ['reverse-proxy-guard']) {
|
||||
return response()->json([
|
||||
|
14
app/Exceptions/InvalidGoogleAuthMigration.php
Normal file
14
app/Exceptions/InvalidGoogleAuthMigration.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
namespace App\Exceptions;
|
||||
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
* Class UndecipherableException.
|
||||
*
|
||||
* @codeCoverageIgnore
|
||||
*/
|
||||
class InvalidGoogleAuthMigration extends Exception
|
||||
{
|
||||
}
|
Reference in New Issue
Block a user