feat(core): Add MFA (#4767)
https://linear.app/n8n/issue/ADO-947/sync-branch-with-master-and-fix-fe-e2e-tets --------- Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -31,10 +31,10 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
import { CHANGE_PASSWORD_MODAL_KEY } from '../constants';
|
||||
import { useToast } from '@/composables';
|
||||
import Modal from '@/components/Modal.vue';
|
||||
import type { IFormInputs } from '@/Interface';
|
||||
import { CHANGE_PASSWORD_MODAL_KEY } from '@/constants';
|
||||
import { mapStores } from 'pinia';
|
||||
import { useUsersStore } from '@/stores/users.store';
|
||||
import { createEventBus } from 'n8n-design-system/utils';
|
||||
@@ -66,7 +66,7 @@ export default defineComponent({
|
||||
...mapStores(useUsersStore),
|
||||
},
|
||||
mounted() {
|
||||
this.config = [
|
||||
const form: IFormInputs = [
|
||||
{
|
||||
name: 'currentPassword',
|
||||
properties: {
|
||||
@@ -107,6 +107,8 @@ export default defineComponent({
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
this.config = form;
|
||||
},
|
||||
methods: {
|
||||
passwordsMatch(value: string | number | boolean | null | undefined) {
|
||||
@@ -127,7 +129,7 @@ export default defineComponent({
|
||||
this.password = e.value;
|
||||
}
|
||||
},
|
||||
async onSubmit(values: { [key: string]: string }) {
|
||||
async onSubmit(values: { currentPassword: string; password: string }) {
|
||||
try {
|
||||
this.loading = true;
|
||||
await this.usersStore.updateCurrentUserPassword(values);
|
||||
|
||||
Reference in New Issue
Block a user