Skip to content

Commit

Permalink
Merge pull request #101 from jeffgreco13/1.x-dev
Browse files Browse the repository at this point in the history
fix: auth route prefixes and ResetPassword override
  • Loading branch information
jeffgreco13 authored Aug 4, 2022
2 parents 7d53caa + c9fe586 commit 6bb16dc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions resources/views/login.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
@if(config("filament-breezy.enable_registration"))
<p class="mt-2 text-sm text-center">
{{ __('filament-breezy::default.or') }}
<a class="text-primary-600" href="{{route('register')}}">
<a class="text-primary-600" href="{{route('filament.register')}}">
{{ strtolower(__('filament-breezy::default.registration.heading')) }}
</a>
</p>
Expand All @@ -25,6 +25,6 @@
</x-filament::button>

<div class="text-center">
<a class="text-primary-600 hover:text-primary-700" href="{{route('password.request')}}">{{ __('filament-breezy::default.login.forgot_password_link') }}</a>
<a class="text-primary-600 hover:text-primary-700" href="{{route('filament.password.request')}}">{{ __('filament-breezy::default.login.forgot_password_link') }}</a>
</div>
</x-filament-breezy::auth-card>
8 changes: 4 additions & 4 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
->group(function () {
// Login will be replaced in the Filament config.
if (config("filament-breezy.enable_registration")) {
Route::get("/register", config('filament-breezy.registration_component_path'))->name("register");
Route::get("/register", config('filament-breezy.registration_component_path'))->name("filament.register");
}
Route::get("/password/reset", config('filament-breezy.password_reset_component_path'))->name(
"password.request"
"filament.password.request"
);

Route::get("/password/reset/{token}", config('filament-breezy.password_reset_component_path'))->name(
"password.reset"
"filament.password.reset"
);

Route::get("email/verify", config('filament-breezy.email_verification_component_path'))
->middleware(["throttle:6,1","auth"])
->name("verification.notice");
->name("filament.verification.notice");

Route::get("email/verify/{id}/{hash}", [
EmailVerificationController::class,
Expand Down
5 changes: 5 additions & 0 deletions src/FilamentBreezyServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Filament\Facades\Filament;
use Filament\Navigation\UserMenuItem;
use Filament\PluginServiceProvider;
use Illuminate\Auth\Notifications\ResetPassword;
use JeffGreco13\FilamentBreezy\Commands\FilamentBreezyCommand;
use JeffGreco13\FilamentBreezy\Http\Livewire\Auth;
use JeffGreco13\FilamentBreezy\Http\Livewire\BreezySanctumTokens;
Expand Down Expand Up @@ -59,6 +60,10 @@ public function packageBooted(): void
]);
});
}

ResetPassword::createUrlUsing(function ($user, string $token) {
return route('filament.password.reset', ['token' => $token]);
});
}

protected function getPages(): array
Expand Down

0 comments on commit 6bb16dc

Please sign in to comment.