diff options
Diffstat (limited to 'app/assets/javascripts/authentication/mount_2fa.js')
-rw-r--r-- | app/assets/javascripts/authentication/mount_2fa.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/assets/javascripts/authentication/mount_2fa.js b/app/assets/javascripts/authentication/mount_2fa.js new file mode 100644 index 00000000000..9917151ac81 --- /dev/null +++ b/app/assets/javascripts/authentication/mount_2fa.js @@ -0,0 +1,14 @@ +import $ from 'jquery'; +import initU2F from './u2f'; +import U2FRegister from './u2f/register'; + +export const mount2faAuthentication = () => { + // Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692) + initU2F(); +}; + +export const mount2faRegistration = () => { + // Soon this will conditionally mount a webauthn app (see https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26692) + const u2fRegister = new U2FRegister($('#js-register-u2f'), gon.u2f); + u2fRegister.start(); +}; |