Detect connection on custom login page

In app we allows user to use emai-password and passwordlles login types.

When user try to reset password we use webAuth.changePassword( connection: , email: <user_email>), but how can we know what type of connection this user use - ‘email’ or ‘Username-Password-Authentication’? We don’t want to send reset password link to passwordless user.

So the idea is basically this -

if (connection == ‘Username-Password-Authentication’)
showError(‘You account allows only paswordlless login!’);