Laravel 8 / Fortify - Email verification link not working (Safari)

Viewed 1431

I'm trying to get laravel's implemented email verification system working (https://laravel.com/docs/8.x/verification).

What i did so far:

  1. Enabled the Feature emailVerification in the file config/fortify.php like so:

    ...
    
    'features' => [
        Features::registration(),
        Features::resetPasswords(),
        Features::emailVerification(),
        Features::updateProfileInformation(),
        Features::updatePasswords(),
        Features::twoFactorAuthentication([
            'confirmPassword' => true,
        ]),
    ],
    
    ...
    
  2. implemented MustVeriffyEmail in the app/Models/User.php file like so:

    <?php
    
    namespace App\Models;
    
    use Illuminate\Contracts\Auth\MustVerifyEmail;
    use Illuminate\Database\Eloquent\Factories\HasFactory;
    use Illuminate\Foundation\Auth\User as Authenticatable;
    use Illuminate\Notifications\Notifiable;
    use Laravel\Fortify\TwoFactorAuthenticatable;
    use Laravel\Jetstream\HasProfilePhoto;
    use Laravel\Jetstream\HasTeams;
    use Laravel\Sanctum\HasApiTokens;
    
    class User extends Authenticatable implements MustVerifyEmail
    {
        use HasApiTokens;
        use HasFactory;
        use HasProfilePhoto;
        use HasTeams;
        use Notifiable;
        use TwoFactorAuthenticatable;
    
    ...
    

My result after these edits is that everything is working just fine except the email verification link which i get per mail. If i try to click the Link it just redirekts me to the login page without any error messages.

The link in the mail looks something like this:

http://127.0.0.1:8000/email/verify/3/995092d93501e0759262089b7ae6eac49b6fe656?expires=1614371149&signature=66ad8a8622e89a4936c71ca89e050cfcba602d7d4dfdcaca1b430a9e5396f49f

If i check my database, everything seems fine too, except i don't get any recorts in the email_verified_at column (which is present).

Maybe someone had the same issue and could help me out here?

Best regards, Leon

1 Answers

you are missing implements

class User extends Authenticatable implements MustVerifyEmail
Related