<?php

namespace App\Repositories;

use App\Models\User;

class UserRepository
{
    /**
     * @param $userData
     * @return static
     */
    public function findOrCreate($userData)
    {
        $user = User::where('email', '=', $userData->email)->first();
        if ($user !== null) {
            return $user;
        }

        return User::create([
            'username' => $userData->nickname,
            'name' => $userData->nickname,
            'email' => $userData->email,
        ]);
    }
}

<?php

namespace App\Repositories;

use App\Models\User;

class UserRepository
{
    /**
     * @param $userData
     * @return static
     */
    public function findOrCreate($userData)
    {
        $user = User::where('email', '=', $userData->email)->first();
        if ($user !== null) {
            return $user;
        }

        return User::create([
            'name'     => $userData->nickname,
            'email'    => $userData->email,
        ]);
    }
}

--- 
+++ 
@@ -18,8 +18,9 @@
         }
 
         return User::create([
-            'name'     => $userData->nickname,
-            'email'    => $userData->email,
+            'username' => $userData->nickname,
+            'name' => $userData->nickname,
+            'email' => $userData->email,
         ]);
     }
 }
Add the username to creation process
