diff options
author | Fatih Acet <acetfatih@gmail.com> | 2017-01-30 13:45:56 +0300 |
---|---|---|
committer | DJ Mountney <david@twkie.net> | 2017-01-31 23:20:08 +0300 |
commit | ae43196338318b8ee3df9de7915201b5d6220ed0 (patch) | |
tree | b1c5db2c02789221220808655a195528bbd9adf4 | |
parent | e43d661eeb905511bd3abeb95560ccdb89317b28 (diff) |
Merge branch '27047-8-16-cannot-login-with-2fa' into 'master'
Resolve "Cannot login with 2fa"
Closes #27047
See merge request !8730
-rw-r--r-- | app/assets/javascripts/dispatcher.js.es6 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/javascripts/dispatcher.js.es6 b/app/assets/javascripts/dispatcher.js.es6 index e0255d64a65..b141457f65d 100644 --- a/app/assets/javascripts/dispatcher.js.es6 +++ b/app/assets/javascripts/dispatcher.js.es6 @@ -64,17 +64,6 @@ new UsernameValidator(); new ActiveTabMemoizer(); break; - case 'sessions:create': - if (!gon.u2f) break; - window.gl.u2fAuthenticate = new gl.U2FAuthenticate( - $("#js-authenticate-u2f"), - '#js-login-u2f-form', - gon.u2f, - document.querySelector('#js-login-2fa-device'), - document.querySelector('.js-2fa-form'), - ); - window.gl.u2fAuthenticate.start(); - break; case 'projects:boards:show': case 'projects:boards:index': shortcut_handler = new ShortcutsNavigation(); @@ -281,6 +270,17 @@ break; } switch (path.first()) { + case 'sessions': + case 'omniauth_callbacks': + if (!gon.u2f) break; + gl.u2fAuthenticate = new gl.U2FAuthenticate( + $('#js-authenticate-u2f'), + '#js-login-u2f-form', + gon.u2f, + document.querySelector('#js-login-2fa-device'), + document.querySelector('.js-2fa-form'), + ); + gl.u2fAuthenticate.start(); case 'admin': new Admin(); switch (path[1]) { @@ -358,7 +358,7 @@ } // If we haven't installed a custom shortcut handler, install the default one if (!shortcut_handler) { - return new Shortcuts(); + new Shortcuts(); } }; |