fix(editor): Fix "error connecting to n8n" error if not logged in (#18818)

This commit is contained in:
Tomi Turtiainen
2025-08-27 09:28:27 +03:00
committed by GitHub
parent 589806b7d7
commit 51c21e00d0
3 changed files with 2 additions and 6 deletions

View File

@@ -205,12 +205,14 @@ function registerAuthenticationHooks() {
const npsSurveyStore = useNpsSurveyStore();
const telemetry = useTelemetry();
const RBACStore = useRBACStore();
const settingsStore = useSettingsStore();
usersStore.registerLoginHook((user) => {
RBACStore.setGlobalScopes(user.globalScopes ?? []);
telemetry.identify(rootStore.instanceId, user.id);
postHogStore.init(user.featureFlags);
npsSurveyStore.setupNpsSurveyOnLogin(user.id, user.settings);
void settingsStore.getModuleSettings();
});
usersStore.registerLogoutHook(() => {

View File

@@ -279,8 +279,6 @@ export const useSettingsStore = defineStore(STORES.SETTINGS, () => {
await getSettings();
initialized.value = true;
await getModuleSettings();
};
const stopShowingSetupPage = () => {

View File

@@ -136,10 +136,6 @@ const login = async (form: LoginRequestDto) => {
loading.value = false;
await settingsStore.getSettings();
if (settingsStore.activeModules.length > 0) {
await settingsStore.getModuleSettings();
}
toast.clearAllStickyNotifications();
if (settingsStore.isMFAEnforced && !usersStore.currentUser?.mfaAuthenticated) {