As invite_key_fields
is a class method from the devise_invitable gem, in your User
model, you can overwrite this class method (assuming first_name and last_name attrs are in this model):
def self.invite_key_fields
%i[email first_name last_name]
end