Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit Script - how to close user session prior to redirect? #9697

Open
sgdowney opened this issue Nov 14, 2023 · 5 comments
Open

Exit Script - how to close user session prior to redirect? #9697

sgdowney opened this issue Nov 14, 2023 · 5 comments

Comments

@sgdowney
Copy link
Contributor

The new implementation of the Exit Script appears to have removed the ability to close secure sessions on the server prior to redirecting the client.
Using the pop-up implementation, when the client clicks on Yes, the redirect occurs but the session is still open on the server. Using the browser back button, the client is able to return to the session they just left.
Using the intermediate page implementation, I can display a message and give the client the choice to stay or go. I understand that by using a special css class an anchor tag can be rendered on the intermediate page with the destination link. Do I now have to create some ajax onClick event listener to tell the server to close the session or is there an easier way to pass the url to the server to close the session then redirect?

@ghost
Copy link

ghost commented Nov 20, 2023

All plugins are strictly client side. Anything server side would require additional code (as wet-boew cannot account for what code your server is using or access it). Looking at the Exit script plugin it has never handle this. Possible your thinking of Session Timeout but even that plugin requires you to provide a link that handles the logout of a session on server side.

https://wet-boew.github.io/v4.0-ci/docs/ref/exitscript/exitscript-en.html
https://github.com/wet-boew/wet-boew/commits/master/src/plugins/exitscript/exitscript.js
https://wet-boew.github.io/v4.0-ci/docs/ref/session-timeout/session-timeout-en.html

I am just a volunteer on this GitHub project.

@ghost
Copy link

ghost commented Nov 20, 2023

I like to add if your server side code cannot currently handle user going to another page how is it handling the ending of a session when user types a different url, leaves a tab, or closes the browser for example. These types of scenarios should be handled on the server side not by wet-boew.

I am just a volunteer on this GitHub project.

@sgdowney
Copy link
Contributor Author

Prior to the most recent release, you could provide a link to the exit script that the script would redirect to if the client chose to follow the link. That provided the connection to the server side to allow for session clean up. The new version does not provide the same level of integration.

@ghost
Copy link

ghost commented Nov 20, 2023

That has not changed per the example page just add data-wb-exitscript='{"url": "../../docs/ref/exitscript/exiturl-en.html"}'.

@sgdowney
Copy link
Contributor Author

sgdowney commented Nov 22, 2023

That setting is for an intermediate landing page to display a message and display the link that was selected. In the previous version you could provide a link for a hidden page that would take the targetUrl as a parameter. That link would be activated by clicking Yes on the popup. On the hidden page you could close the session then redirect to the target url. That provided the connection to the server side for session clean up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant