Commit Graph

11 Commits

Author SHA1 Message Date
Robert Speicher 9f554aadd5 Fix 2FA-based login for LDAP users
The OTP input form is shared by both LDAP and standard logins, but when
coming from an LDAP-based form, the form parameters aren't nested in a
Hash based on the `resource_name` value.

Now we check for a nested `remember_me` parameter and use that if it
exists, or fall back to the non-nested parameters if it doesn't.

Somewhat confusingly, the OTP input form _does_ nest parameters under
the `resource_name`, regardless of what type of login we're coming from,
so that allows everything else to work as normal.
2016-06-07 18:47:46 -04:00
Timothy Andrew 86b07caa59 Implement authentication (login) using a U2F device.
- Move the `authenticate_with_two_factor` method from
  `ApplicationController` to the `AuthenticatesWithTwoFactor` module,
  where it should be.
2016-06-06 12:50:31 +05:30
Connor Shea ec1191a110
Disable 2FA field autocomplete, resolves #18021. 2016-06-01 12:45:53 -06:00
Robert Speicher a602df3031 Pass the "Remember me" value to the 2FA token form
Prior, if a user had 2FA enabled and checked the "Remember me" field,
the setting was ignored because the OTP input was on a new form and the
value was never passed.

Closes #18000
2016-05-30 22:25:35 -04:00
connorshea b898810c8d
Improve the Two-factor Authentication sign-in text [ci skip]
Resolves #14543.
2016-05-03 13:55:19 -06:00
Robert Speicher 76873ce4a4 Move "invalid 2FA code" error message to the flash
This makes it consistent with the Invalid email/password error message
from the previous step.
2015-05-09 17:32:49 -04:00
Robert Speicher a4267033f2 Add a hint on login form about using a recovery code 2015-05-09 17:32:09 -04:00
Robert Speicher 32971b0af4 Refactor SessionsController
Also adds test case for providing an invalid 2FA code and then a valid
one without re-entering username and password.
2015-05-09 17:32:09 -04:00
Robert Speicher 6fa2942920 Update login views for two-factor auth 2015-05-09 17:31:40 -04:00
Robert Speicher bd680999f9 Be consistent with what we call the 2FA feature
"Two-factor" vs. "2-Factor"
2015-05-09 17:31:39 -04:00
Dmitriy Zaporozhets de9e1c3bad Turn 2-factor authentication into 2 steps process. Disabled 2fa UI for ldap users since it is not supported 2015-05-09 17:31:10 -04:00