diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-07-11 13:00:22 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-07-14 08:19:09 +0530 |
commit | 4b33c4c6d1aa529ec22606995123cfa3a151ccee (patch) | |
tree | 3b8a555e88995454e9db663bd35cd5c3eb5ab6f8 /app/views/devise/sessions/two_factor.html.haml | |
parent | df49492fc011bd74ebaa4cb82bd85252127859a0 (diff) | |
download | gitlab-ce-4b33c4c6d1aa529ec22606995123cfa3a151ccee.tar.gz |
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.
Diffstat (limited to 'app/views/devise/sessions/two_factor.html.haml')
-rw-r--r-- | app/views/devise/sessions/two_factor.html.haml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/views/devise/sessions/two_factor.html.haml b/app/views/devise/sessions/two_factor.html.haml index a373f61bd3c..dbf4d699d01 100644 --- a/app/views/devise/sessions/two_factor.html.haml +++ b/app/views/devise/sessions/two_factor.html.haml @@ -1,3 +1,7 @@ +- content_for :page_specific_javascripts do + - if inject_u2f_api? + = page_specific_javascript_tag('u2f.js') + %div .login-box .login-heading |