wixUser.logout calls promptLogin

Hi there,

I call wixUser.logout() command for logout,then redirect to other page. But it seems logout calls promptLogin & it shows login form. After clicking “X” it redirects.

How can I prevent from promptLogin?

wixUsers.logout().then(() => {
wixLocation.to(wixLocation.baseUrl);
});

Hello, Togrul

Try doing:

wixLocation.to('/'); 

Best,
Majd

@togrul88 where are you adding this code?