protected function insertToken(?Authenticatable $user, string $token, string $email) : Token
    {
        if ($user === null) {
            throw new NullValueException("User cannot be null");
        }

        /** @var \Laranix\Auth\User\Token\Token $row */
        $row = $this->getModel()
                    ->updateOrCreateNew([
                        'user_id'   => $user->getAuthIdentifier(),
                        'email'     => $email,
                        'token'     => $token,
                    ], 'user_id');

        if ($row->wasRecentlyCreated) {
            $this->fireCreatedEvent($user, $row);
        } else {
            $this->fireUpdatedEvent($user, $row);
        }

        return $row;
    }