Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: redirect url when setup complete at first login (#5730)

Liu Ji39f12ecd9a67
diff --git a/frontend/src/views/TwoFactorSetup.vue b/frontend/src/views/TwoFactorSetup.vue
index 0c5a984542..afcee3e2b8 100644
--- a/frontend/src/views/TwoFactorSetup.vue
+++ b/frontend/src/views/TwoFactorSetup.vue
@@ -214,9 +214,15 @@ const tryFinishSetup = async () => {
style: "SUCCESS",
title: t("two-factor.messages.2fa-enabled"),
});
- router.replace({
- name: "setting.profile",
- });
+ if (router.currentRoute.value.name === "2fa.setup") {
+ router.replace({
+ path: "/",
+ });
+ } else {
+ router.replace({
+ name: "setting.profile",
+ });
+ }
};
watch(