useTwoFactorPlugins.ts 409 B

123456789101112131415
  1. // Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. import { keyBy } from 'lodash-es'
  3. import { twoFactorPluginsFiles } from './initializeTwoFactorPlugins.ts'
  4. const plugins = twoFactorPluginsFiles
  5. const pluginListLookup = keyBy(plugins, 'name')
  6. export const useTwoFactorPlugins = () => {
  7. return {
  8. twoFactorMethods: plugins,
  9. twoFactorMethodLookup: pluginListLookup,
  10. }
  11. }