Commit graph

14 commits

Author SHA1 Message Date
DJ Mountney
9224f031cf Pass the remember_me option into the u2f form and support it while authenticating
Matches the changes done for non-u2f two-factor auth
2016-09-01 17:11:42 -07:00
Timothy Andrew
341d8bc3f7 Add a U2F feature spec for multiple devices owned by the same user.
1. This scenario was previously tested for the registration flow, but
   not authentication.
2016-07-14 08:19:09 +05:30
Timothy Andrew
4b33c4c6d1 Load Javascript U2F library selectively.
1. Only on supported Chrome versions

2. Mainly, this lets us simplify the javascript-based U2F check to
   `window.u2f`, where `window.u2f` can either be loaded from the GitLab
   server (for Chrome) or from the Firefox extension.

3. This is a better way to provide browser detection for U2F.
2016-07-14 08:19:09 +05:30
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