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

Windows Authentication Logout #81

Open
Dp-major opened this issue Feb 5, 2020 · 1 comment
Open

Windows Authentication Logout #81

Dp-major opened this issue Feb 5, 2020 · 1 comment

Comments

@Dp-major
Copy link

Dp-major commented Feb 5, 2020

Hi, I am using node-sspi module for implementing windows authentication and its working fine but I can't find a way to logout the from current session until unless I close the browser. Is it possible to logout without closing the browser, if yes then how can we implement it. Any help would be appreciated.

Thank You

@jlguenego
Copy link

jlguenego commented Mar 27, 2020

You can do it by using a express session. Thus you do not need to use the authentication middleware on all url, but just on a SSO login url. You then store the auth info in req.session.sso object.

Thus, you can perform a logout by removing the req.session.sso object.

DISCLAIMER: I am the author of a very similar module, called node-expose-sspi. And I provide some examples that do exactly what you are looking for. https://github.com/jlguenego/node-expose-sspi

https://github.com/jlguenego/node-expose-sspi/tree/master/examples/express-ejs

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

2 participants