How do I keep my user logged in

I’d like to know what’s the best way to keep the user logged in. Right now my website can log the user in but every time the user visits another page the user gets logged out. I’m thinking about sending a parameter of the login status to every page the user can visit. Is there a better way to go about this?

Check if you have a workflow on page that log the user out. User stay logged in and shouldn’t be logged out when going to another page

The only workflow I have that logs the user out is when the user clicks a log out button. Maybe I forgot to include a setting in my workflow to remember the user?

You can check your login action to stay logged in.

This is what I have.

Should be fine. Use “step by step” in debug mode and load a new page where user is logged out. Check what is running to be sure there’s nothing else.

I ran some tests it looks like the user is logged in but because my navbar ,which is a reuseable element, uses custom state to change its display options(like displaying login when user is logged out and logged out when user is logged in) that’s why it shows that my user is logged out. I can solve this problem by passing down a parameter that stores the custom state to the next page. Is there a better way to go about this?

1 Like

Normally, you will user trigger “user is logged out” and put the qction to show popup in yhis workflow

And for icon or element that show user dtatus, use a conditionnal with user is logged in. No need for custom states

1 Like