Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon Can I customize the email verification process in Jetstream


Can I customize the email verification process in Jetstream


Yes, you can customize the email verification process in Laravel Jetstream. Jetstream provides several ways to customize the email verification functionality:

1. Customizing the Verification Email Template:
- Jetstream uses a Blade view for the verification email template, located at `resources/views/auth/verify-email.blade.php`.
- You can customize the content and styling of this view to match your application's branding and requirements.

2. Customizing the Verification Notice View:
- When a user needs to verify their email, Jetstream redirects them to a verification notice view.
- You can customize this view by modifying the `resources/views/auth/verify-email.blade.php` file.

3. Customizing the Verification Redirect:
- By default, Jetstream redirects the user to the dashboard after they have verified their email.
- You can customize the redirect path by overriding the `verified` middleware in your `App\Http\Middleware\VerifyEmail` class.

4. Customizing the Verification Logic:
- If you need to add additional validation or logic to the email verification process, you can override the `verify` method in your `App\Actions\Fortify\VerifyEmail` class.
- This allows you to customize the verification process to fit your application's specific requirements.

5. Disabling Email Verification:
- If you don't need email verification for your application, you can disable it by removing the `email.verification` feature from the `fortify.php` configuration file.

6. Customizing the Verification Notification:
- Jetstream uses the `Illuminate\Auth\Notifications\VerifyEmail` notification class to send the verification email.
- You can create a custom notification class that extends this class and customize the notification's content and delivery.

By leveraging these customization options, you can tailor the email verification process to match your application's branding, user experience, and specific requirements. This allows you to maintain control over the verification flow while still benefiting from the core functionality provided by Jetstream.

Citations:
[1] https://www.youtube.com/watch?v=-nzeLnmcseY
[2] https://www.twilio.com/en-us/blog/laravel-breeze-vs-laravel-jetstream
[3] https://github.com/laravel/jetstream/actions/runs/9151501616/workflow
[4] https://jetstream.laravel.com
[5] https://jetstream.laravel.com/stacks/inertia.html