Hi guys,
quick question.
Im trying to get the logout() function to work in a NGDesktop environment. Im am using the svySecurity Framework for this solution.
The problem is, when i click logout the function scopes.svySecurity.logout()
is getting called (which works perfectly in a browser-environment) but in ngdesktop i dont get send back to the login-form AND the whole electron client is not responsive anymore. I have to kill it via taskmanager or run a new one from servoy-developer.
I tried to add a application.exit() before the logout but this just sends me to the “page-expired-page” and the electron client gets unsresponsive too.
Does anyone has a idea or is this a known issue?
Thanks and greetings
-Vik
do you also have this when not running from developer?
so in an actual deploy?
just tried it on the customer server.
yep same behavior. Electron gets unresponsive and no logout.
if i quickly test this on a 25.03 with a stateless login logging so i login through the stateles login html then i press a logout button the form that loads, that brings me back to the stateless login again
thanks for testing.
i am using a login-form in this solution. here are my props
So youre recommending to switch to stateless-login?
There shouldn’t be a specific way of login I guess.
I always just test this by a simple security.logout() through the command console.
That should bring you back to the login page.
First in normal browser, then in NGDesktop. Both should have the same behaviour, after all NGDesktop is no more than a controlled browser environment.
Hi Marc,
well yes i agree.
The logout function works perfectly fine in a normal Browser (just tested all of them), just as it should and comes out of the box from servoy.
But the NG-Desktop logout with a “normal” login-form does not. Nor am i getting any warnings, errors or logs in either consoles.
The whole electron client just gets unresponsive.
edit:
i turned tracing on to see if i get anything out of it but idk.
tracing of the security.logout() with firefox working
tracing of security.logout() with ngdesktop broken
edit 2:
found the culprit.
i removed the following line in my onSolutionOpen():
plugins.ngclientutils.setOnUnloadConfirmation(true)
now it works in ngdesktop as it should.
This also has been an issue in the past, it might be related to this:
Although it might be nice for NGDesktop to keep behaving nicely , the outcome of the above ticket is that the onUnloadConfirmation can not prevent the NGDesktop from closing.
In this case it isn’t about closing but moving away to a different page.
The main question is, whether the unloadConfirmation dialog is valid when a user pressed the logout button. It is more to prevent a user from accidentally closing the browser.
Personally I wouldn’t use that onUnloadConfirmation setting in NGDesktop at all, just keep this for users in a browser