App connect component to access Server Sessions

In general Wappler offers an amazing array of methods for manipulating variables of all types within App Connect and Server Connect. However there remains two issues which I feel could be improved.

  1. Server Connect manages Server Sessions, APP connect also offers session management however these are browsers sessions. This can lead to confusion among users, particularly those new to wappler who do not realise the difference

  2. These is no way within App Connect to directly access a server session variable which leads users to revert to embedding code, for example </php echo $_SESSION[‘myvar’];?>

My feature request is that a method is implemented in App connect which allows for the direct access of session vars from app connect

Perhaps a new set variable option (or enhancement of the current version) where the name of a session variable could be input and the value returned from the server

This would also need a method .refresh() available within the action picker to allow the variable to be re-synchronised with the server where necessary

In addition, I suggest the session manger by renamed browser session manager to remove confusion

An additional server session manager to keep app connect and server connect synchronised in real time would be even better but I am prepared to compromise on this one

What could still be confusing - if server session values were available in App Connect - is that people would assume they could assign a new value to this session, but they would only be assigning a value to a copy of it (which in some cases, might be what’s required).

Is this what the suggestion in your note addresses?

I believe Brian’s request is to just make the session available in the data picker, so to just bind it on the page.

1 Like

Thats correct @Teodor, setting session variables should remain server side, its a simple server action to set this up with minimal overhead. I actually define server actions to get the value of a session variable also, a simple server action which does nothing more than assign a session variable to a value and output it

1 Like

Thanks - I think this is all clear now.

I currently work around this by using the local storage component, and it works very well.

I have created a user object, then when the user logs in, I then set the server session variables, output what I need and store them in local1.user.myServerSessionVariable

1 Like