Skip to content

Commit c46ac02

Browse files
committed
fix: add error handling for missing Two-Factor Authentication modal in save interceptor
1 parent e2be7f1 commit c46ac02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

adminforth/documentation/docs/tutorial/07-Plugins/02-TwoFactorsAuth.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,9 @@ registerSaveInterceptor(async ({ action, values, resource }) => {
349349
// Pass data to backend; the view will forward extra.confirmationResult to meta.confirmationResult
350350
return { ok: true, extra: { confirmationResult } };
351351
}
352+
else {
353+
throw new Error('No Two-Factor Authentication modal found, please ensure you have latest version of @adminforth/two-factors-auth installed and instantiated on resource');
354+
}
352355
return { ok: false, error: 'Two-factor authentication code is required' };
353356
});
354357
</script>

0 commit comments

Comments
 (0)