Closed Zer0xFF closed 4 years ago
I'll take a look.
I'll see it over the weeksays.
Okay, this is out of the scope of the package.
The only fix I could make is to add the email key to the rules, and require it if the username key is absent.
You shouldn't override the view since the problem is not there but in the rules themselves.
I've setup 2FA for a login system I'm using, and it works great when logging in through email address, however it fails when we attempt username based login instead.
to allow the users to login through both email/user we override
LoginController ::credentials
as followsbecause of this,
saveCredentials
saves fieldusername
which results in fail login attempt after entering the 2fa code,The email field is required.
I'm not sure what's the best way around to fixing this, Im currently overriding the view and changing the field name
username
toemail
, as a workaround.