feat: fix verify email
This commit is contained in:
@@ -42,6 +42,20 @@ class AppServiceProvider extends ServiceProvider
|
||||
|
||||
Notification::extend('expo', fn ($app) => $app->make(ExpoPushChannel::class));
|
||||
|
||||
VerifyEmail::createUrlUsing(function (User $notifiable): string {
|
||||
$relativeUrl = URL::temporarySignedRoute(
|
||||
'verification.verify',
|
||||
now()->addMinutes((int) config('auth.verification.expire', 60)),
|
||||
[
|
||||
'id' => $notifiable->getKey(),
|
||||
'hash' => sha1($notifiable->getEmailForVerification()),
|
||||
],
|
||||
absolute: false,
|
||||
);
|
||||
|
||||
return url($relativeUrl);
|
||||
});
|
||||
|
||||
VerifyEmail::toMailUsing(
|
||||
fn (User $notifiable, string $verificationUrl): VerifyAccount => (new VerifyAccount($notifiable, $verificationUrl))
|
||||
->to($notifiable->getEmailForVerification())
|
||||
|
||||
Reference in New Issue
Block a user