Security identity in Globals bug. version 6.5.5

Security login works but security identity put in the Globals returns a false value after login success. This obviously effects everything dependent on security identity of a server session in nodejs web applications

Did you get a cookie after the login?

yes. as greyed one below. note that i am trying to not use any explicit cookies in my app.

Which session store do you use on the server?

i dont know what you mean by that.
if you are referring to 'set session' i am not setting any. it is a simple login like below

I'm referring to the session options in the server connect settings.

image

@patrick
note: i did uninstall wappler before installing 6.5.5.

Session Store: Memory
Session TTL 86400

In the file lib/auth/provider.js line 73 has the code await this.app.regenerateSessionId();. Comment this out and restart the server, does that fix your issue?

Unfortunately, no.
image

How do you retrieve the identity, do you use the identify action?

it stopped working on my main project because of this problem after update. so i opened a docker test project to test the problem which i am sharing.

i have in globals;


which i use to determine if user is logged in using server connect action like below. in below i have two output to test if i can get a value from any to a content page or layout page. i dont get any. but i do get 'identity' from login (login server action) form data on form submit success but no value for 'user_identity' from globals along.

i hope that answers your question.

Where does user_identity come from? The Security Identify action step is for getting the identity of the logged in user.

User_identity named distinctly so as to note that it is identity from Globals as also observable in earlier shared snapshots. The identity which is receivable to UI is from login server action’s security-login step. The later is received on submit event from form data when a bind is made. So I feel it is alright to say identity from Globals is not available for late binding. Perhaps something to do with server session.
Hope my answer is what you meant to know.

Sorry if this create some confusion, but I have some questions about this

First of all set value should not be placed after identity ? At least on PHP this returns null

image

In your case:

image

Also you have binded user_identity as a value on your "set value" step, and the name of the identify step is identity and not user_identity
It's like user_identity doesn't exist.

Or I'm wrong here?

PS: Are you sure that identity comes from your same security provider?

@patrick
btw, i open an old project and did not make below prompted updates, the app worked fine without any issues. the project has same security and authentication related configuration.

sets same session cookie only;

@franse it does not matter what i name it 'identity' or 'user_identity'; identity from Globals is always false.

Yes, same security provider because i only have one security provider. and login authentication in itself works and creates no error, meaning related db etc is working.

" Also you have binded user_identity as a value on your "set value" step, and the name of the identify step is identity and not user_identity"
on the quoted; in the output of logged server action in the picture, as i mentioned earlier i am trying to make two output values. one 'identity' directly from the same action step and the other one as set value step which is bound to Globals:identity value. neither does give me a value even after login. but i do get an identity value from login server action execution success event from form data 'identity' which is only event based.

Yes, I can recreate the issue, seems i'ts a nodejs problem only. Works fine on PHP.
image

I guess the team will bring a fix quickly :slight_smile:

1 Like

@franse thanks for the contribution. i did wait to see if anyone else came up with the issue. innitally i thought my configuration became redundent with new session related changes for nodejs projects with the update.
Yes, hoping for quick fix, my project progress is much slower than i desire. need to get it on production this year and i am a long way from that.
:+1:

1 Like