Skip to content

Commit

Permalink
Merge branch 'vormkracht10:main' into feature/validation-selecting-fa…
Browse files Browse the repository at this point in the history
…ctors
  • Loading branch information
lucascnunes authored Nov 13, 2024
2 parents c68454e + 5b37aca commit b73de07
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
File renamed without changes.
1 change: 0 additions & 1 deletion resources/dist/filament-2fa.css

This file was deleted.

Empty file removed resources/dist/filament-2fa.js
Empty file.
10 changes: 6 additions & 4 deletions resources/views/two-factor.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
<div class="space-y-10 divide-y divide-gray-900/10 ">
<div class="grid grid-cols-1 gap-x-8 gap-y-8 pt-10 md:grid-cols-3">
<div class="pr-4 sm:px-0">
<h2 class="text-base font-semibold leading-7 dark:bg-white">
<h2 class="text-base font-semibold leading-7">
{{ __('Secure your account') }}
</h2>

@if (!$showingRecoveryCodes && $user->two_factor_confirmed_at)
<p class="mt-1 text-sm leading-6 dark:bg-white mb-4">
<p class="mt-1 text-sm leading-6 mb-4">
{{ __('Your account has been secured with two factor authentication') }}.
</p>
@else
<p class="mt-1 text-sm leading-6 dark:bg-white mb-4">
<p class="mt-1 text-sm leading-6 mb-4">
{{ __('Add additional security to your account using two factor authentication') }}.
</p>
@endif
Expand Down Expand Up @@ -54,7 +54,9 @@
{!! __('Or scan the QR code with your authenticator app') !!}.
</div>
<div class="flex items-center justify-center mt-2">
{!! $user->twoFactorQrCodeSvg() !!}
<div class="border-4 border-white">
{!! $user->twoFactorQrCodeSvg() !!}
</div>
</div>
<br />
<p class="text-sm">
Expand Down
12 changes: 7 additions & 5 deletions src/TwoFactorAuthServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ public function configurePackage(Package $package): void
}
}

public function packageRegistered(): void {}
public function packageRegistered(): void
{
$this->forceFortifyConfig();
}

public function packageBooted(): void
{
Expand Down Expand Up @@ -145,8 +148,6 @@ public function packageBooted(): void
// Testing
Testable::mixin(new TestsTwoFactorAuth);

$this->forceFortifyConfig();

$this->registerContractsAndComponents();

$this->defineRateLimiters();
Expand Down Expand Up @@ -180,6 +181,7 @@ protected function forceFortifyConfig(): void
{
config([
'filament.auth.pages.login' => config('filament-2fa.login'),
'fortify.prefix' => 'fortify',
'fortify.views' => true,
'fortify.home' => config('filament.home_url'),
'forms.dark_mode' => config('filament.dark_mode'),
Expand Down Expand Up @@ -268,8 +270,8 @@ protected function getAssets(): array
{
return [
// AlpineComponent::make('filament-2fa', __DIR__ . '/../resources/dist/components/filament-2fa.js'),
Css::make('filament-2fa-styles', __DIR__ . '/../resources/dist/filament-2fa.css'),
Js::make('filament-2fa-scripts', __DIR__ . '/../resources/dist/filament-2fa.js'),
// Css::make('filament-2fa-styles', __DIR__ . '/../resources/dist/filament-2fa.css'),
// Js::make('filament-2fa-scripts', __DIR__ . '/../resources/dist/filament-2fa.js'),
];
}

Expand Down

0 comments on commit b73de07

Please sign in to comment.