Redirecting logged-out user (only when log out)

I have logout at slidemenu (hamburger menu). When a user clicks, s/he will log out.

What happens is the user logs out but nothing happens (of course, user’s own data disappear), but I cannot redirect this logged out user to a certain page, for example, to landing page BECAUSE I found this workflow affects any logged-out users. For example, a logged-out user goes to Login page, then s/he will then automatically get redirected to landing page.

At slidemenu plugin, when logging out a user, there is no way I can add custom states or whatever.

I am sure there must be a way for this problem, but haven’t found one yet. Can anyone help me with this?

Thank you very much.

Just create a workflow in your page to run when a user is logged out, redirecting them to your landing page. :+1:

Hi @rpetribu, as I said, I found such a workflow will also other logged-out users and they cannot even log in as everytime they want to go to login page, they are again redirected to landing page. That’s what I’ve been experiencing and why I am seeking help. This doesn’t happen to you? Thanks for your quick reply though.

Hi there, @yj.johnrhee… I might be misunderstanding your post (screenshots of your workflows would help), but can’t you do the redirect in a workflow action in the same workflow that logs the user out? So, the user clicks the slide out menu and logs out, and you run a workflow with two actions… 1) log the user out and 2) navigate the user to the landing page. Something like that shouldn’t have any effect on other logged out users.

I’m sure I am missing something here because what I am suggesting is too simple. So, if you can share some screenshots, it might be easier for someone to help.

Best…
Mike

2 Likes

Yeah, as @mikeloc says, it’s simple…

Just log the User out then redirect them to whatever page you want to send them to.

i.e.
Step 1 - Log The User Out
Step 2 - Go To Page

Hi @mikeloc and @adamhholmes
Thanks for help.
I am building a mobile app as a single page app, using custom states to navigate to different pages, and maybe that’s why? Still, I cannot avoid this problem.


If I add any action after logout to redirect to another page (landing) using custom states, that affects all logged-out users and they cannot even login because they are always redirected to landing page regardless of pages they selected.

Thanks.

In that case, instead of using a Go To Page action, just use whatever action you use for ‘navigating’ between ‘pages’ on your single page app (i.e. set a custom state)

Still, I cannot avoid this problem.

Why not? (i don’t understand…)

If I add any action after logout to redirect to another page (landing) using custom states, that affects all logged-out users and they cannot even login because they are always redirected to landing page regardless of pages they selected.

No it doesn’t (it certainly shouldn’t anyway)… can you clarify what you mean by that (or give an example)…

1 Like

This is what I figured.

Although you have different menus set up at the slidemenu (plugin) using option sets - such as login, logout, terms of use, FAQ, etc) and you set up workflows for when each menu is clicked, whatever menu click on the slidemenu, it runs on the slidemenu click workflow. So, if you have a logout workflow followed by redirecting to a different page (actually different group via custom states), you end up in the to-be-redirected-to page(group). Since I don’t use page parameters for switching between pages (groups), I don’t know if the result would be the same. But, that’s what I figured out (guess I’m right) and had to use a walk-around method.

@mikeloc , I think he is using some kind of plugin to build the menu and he don’t have access to the code. As far as I understood, the plugin already have a built in function to log the user out.

@yj.johnrhee This workflow/trigger should not be placed in your login page. As you expect to receive logout user accessing it. You need to place this workflow action in every other internal page.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.