diff --git a/src/Actions/TwoFactorAuth/DisableTwoFactorAuthentication.php b/src/Actions/TwoFactorAuth/DisableTwoFactorAuthentication.php index 3977802..182be63 100644 --- a/src/Actions/TwoFactorAuth/DisableTwoFactorAuthentication.php +++ b/src/Actions/TwoFactorAuth/DisableTwoFactorAuthentication.php @@ -10,7 +10,6 @@ class DisableTwoFactorAuthentication /** * Disable two factor authentication for the user. * - * @param \Devdojo\Auth\Models\User $user * @return void */ public function __invoke(User $user) diff --git a/src/Actions/TwoFactorAuth/GenerateQrCodeAndSecretKey.php b/src/Actions/TwoFactorAuth/GenerateQrCodeAndSecretKey.php index 1e272f4..71b352f 100644 --- a/src/Actions/TwoFactorAuth/GenerateQrCodeAndSecretKey.php +++ b/src/Actions/TwoFactorAuth/GenerateQrCodeAndSecretKey.php @@ -12,10 +12,10 @@ class GenerateQrCodeAndSecretKey { public string $companyName; + /** * Generate new recovery codes for the user. * - * @param \Devdojo\Auth\Models\User $user * @return array{string, string} */ public function __invoke(User $user): array @@ -25,13 +25,13 @@ public function __invoke(User $user): array $secret_key = $google2fa->generateSecretKey(); $this->companyName = 'Auth'; - if(is_string(config('app.name'))){ + if (is_string(config('app.name'))) { $this->companyName = config('app.name'); } $g2faUrl = $google2fa->getQRCodeUrl( $this->companyName, - (string)$user->email, + (string) $user->email, $secret_key ); diff --git a/src/Http/Controllers/SocialController.php b/src/Http/Controllers/SocialController.php index 6eddbb6..e2f4688 100644 --- a/src/Http/Controllers/SocialController.php +++ b/src/Http/Controllers/SocialController.php @@ -5,11 +5,11 @@ use Devdojo\Auth\Models\User; use Devdojo\Auth\Models\SocialProvider; use Devdojo\Auth\Models\SocialProviderUser; +use Illuminate\Http\RedirectResponse; use Illuminate\Support\Facades\Auth; use Illuminate\Support\Facades\Config; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Request; -use Illuminate\Http\RedirectResponse; use Laravel\Socialite\Facades\Socialite; class SocialController diff --git a/src/Models/User.php b/src/Models/User.php index 13b2dc9..29d817f 100644 --- a/src/Models/User.php +++ b/src/Models/User.php @@ -21,7 +21,7 @@ class User extends Authenticatable implements MustVerifyEmail use HasSocialProviders; protected $fillable = [ - 'name', 'email', 'password', 'two_factor_secret', 'two_factor_recovery_codes', 'two_factor_confirmed_at' + 'name', 'email', 'password', 'two_factor_secret', 'two_factor_recovery_codes', 'two_factor_confirmed_at', ]; public function hasVerifiedEmail()