feat: reset password
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Providers;
|
||||
use App\Broadcasting\ExpoPushChannel;
|
||||
use App\Mail\VerifyAccount;
|
||||
use App\Models\User;
|
||||
use Illuminate\Auth\Notifications\ResetPassword;
|
||||
use Illuminate\Auth\Notifications\VerifyEmail;
|
||||
use Illuminate\Support\Facades\Gate;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
@@ -61,6 +62,16 @@ class AppServiceProvider extends ServiceProvider
|
||||
->to($notifiable->getEmailForVerification())
|
||||
);
|
||||
|
||||
ResetPassword::createUrlUsing(function (User $notifiable, string $token): string {
|
||||
$passwordResetUrl = rtrim((string) config('services.mobile.password_reset_url'), '?&');
|
||||
$query = http_build_query([
|
||||
'email' => $notifiable->getEmailForPasswordReset(),
|
||||
'token' => $token,
|
||||
], '', '&', PHP_QUERY_RFC3986);
|
||||
|
||||
return "{$passwordResetUrl}?{$query}";
|
||||
});
|
||||
|
||||
Gate::define('viewApiDocs', function ($user = null) {
|
||||
// Option A : Autoriser tout le monde (Attention : la doc sera publique hors local)
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user