Logout redirect to current url
Hey,
I have some problems when the user press the logout link - user always redirects on Home page. I have written for this link attribute data-ms-redirect="current-url" and expect that the user will stay on the same page, after logging out but it's not working properly.
How I can fix it?
Thanks :)
Comments
7 comments
Hey there,
Thank you for posting. The data attribute you are trying to use is for login and signup but not logout. Redirects can be added by following the steps in this doc.
Hey, thanks for the answer.
Is it possible to make a redirect for the previous url with your advice? The same as it works with attribute when user login to cabinet?
Published media Here's the article you're looking for https://docs.memberstack.com/hc/en-us/articles/20188140717979
Duncan Hamra I have already used it, it works properly for login but not works for logout...
Ahhh I understand now. I'm afraid I don't have a solution for the logout link... how important is this for you?
If it's super important you could add a script that redirects to the previous page when a link a param is present. And add the link param via the default logout redirect.
It was not clear that log out, was not working with data-ms-redirect="current-url"
It should be nice that it works the same way as login.
Now I struggle to make the log out page redirection (I have the impression that there is a bug on the logout redirect page). When I change the url it doesn't take it into account immediately.
Can you advise ?
Agreed! I'll ask Tyler about this.
I just did some testing on the logout redirects and they appear to be working for me... hmmmm.
Can you confirm you are doing the following.
A video would be suuuuper helpful if you have the time.
Please sign in to leave a comment.