diff options
author | Phil Hughes <me@iamphill.com> | 2018-01-22 13:51:18 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-01-22 13:51:18 +0300 |
commit | 208eb7d69790ad6842274cd46cf5a0e8006eb9f5 (patch) | |
tree | e847e29de7b3d66fff9570247eeb585526cb1e08 /app/assets/javascripts/shared | |
parent | 68cc9ea22daa8c13b2cb880dcde2606b6b5b43b6 (diff) |
Added dispatcher imports for sessions route
Diffstat (limited to 'app/assets/javascripts/shared')
-rw-r--r-- | app/assets/javascripts/shared/sessions/u2f.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/assets/javascripts/shared/sessions/u2f.js b/app/assets/javascripts/shared/sessions/u2f.js new file mode 100644 index 00000000000..1d075f7e872 --- /dev/null +++ b/app/assets/javascripts/shared/sessions/u2f.js @@ -0,0 +1,16 @@ +import U2FAuthenticate from '../../u2f/authenticate'; + +export default () => { + if (!gon.u2f) return; + + const u2fAuthenticate = new U2FAuthenticate( + $('#js-authenticate-u2f'), + '#js-login-u2f-form', + gon.u2f, + document.querySelector('#js-login-2fa-device'), + document.querySelector('.js-2fa-form'), + ); + u2fAuthenticate.start(); + // needed in rspec + gl.u2fAuthenticate = u2fAuthenticate; +}; |