I have a small dashboard with only two pages. An index page and a login page.
When I go to the dashboard I am redirected to the log in form as it should. On successful login it is directed to the index page and all appears to be fine. The Index page comes up and displays fine.
But if you do a simple refresh of the page it kicks you back out to the login page. Also the log out link does nothing. I assume that is technically because it is already logged out.
There are no errors n the console and all data comes up as it should. It just doesn’t hold the login.
I’m at my wits end. Everything is identical to other dashboards I have done.
Here is a video showing the problem. First I log in then I click on the header link which just refreshes the page. Then I have to log in again. Then I click on the ‘Test Link’ that goes to another page with security restrict and it kicks me back out to the login again.
Video Removed
Is there a way to display the ‘identity’ session or cookie whatever it is that gets created on the page?
I am such a moron … forgot to check no auto load on my log out server connect. Could have sworn it was checked.
All is good except now my logout doesn’t redirect back to login page. I’ll start a new thread for that if I can’t figure that one out. Probably something stupid as well.
LOL, in my defense, if the logout server action was redirecting like it’s suppose to I would have found this a lot sooner.
Still no idea why logout redirect isn’t working but I solved it with a flow; logout and the browser goto … not the right way to fix it but ran out of options.
Set unauthorized dynamic action in your server connect properties for the user profile query and add a browser goto for your log-in page. That way when they are logged out and the profile returns unauthorized they'll be re-directed to log-in...
But why do I have to do that on this one dashboard, the newest of my projects? Much like my flow solution it’s still a work around. I have five dashboards and all work fine except the one?
No idea why. But at least there is a couple options for workarounds. The beauty of Wappler. Often more than one way to do things.