diff --git a/frontend/src/scenes/authentication/twoFactorLogic.ts b/frontend/src/scenes/authentication/twoFactorLogic.ts index 9f5c1e5eecb5a..43d31a7f4d189 100644 --- a/frontend/src/scenes/authentication/twoFactorLogic.ts +++ b/frontend/src/scenes/authentication/twoFactorLogic.ts @@ -37,6 +37,7 @@ export const twoFactorLogic = kea([ toggleTwoFactorSetupModal: (open: boolean) => ({ open }), toggleDisable2FAModal: (open: boolean) => ({ open }), toggleBackupCodesModal: (open: boolean) => ({ open }), + startSetup: true, }), reducers({ isTwoFactorSetupModalOpen: [ @@ -158,9 +159,13 @@ export const twoFactorLogic = kea([ actions.resetToken() } }, + startSetup: async () => { + await api.get('api/users/@me/two_factor_start_setup/') + }, })), afterMount(({ actions }) => { + actions.startSetup() actions.loadStatus() }), ])