NodeSSPI | Server-side windows authentication for Node.js | Runtime Evironment library
kandi X-RAY | NodeSSPI Summary
kandi X-RAY | NodeSSPI Summary
Following code illustrates how to add NodeSSPI to the request processing pipeline. Although the code requires Express.js, NodeSSPI doesn’t have to be run under the context of Express.js. In fact, at runtime it has no npm module dependencies.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of NodeSSPI
NodeSSPI Key Features
NodeSSPI Examples and Code Snippets
Community Discussions
Trending Discussions on NodeSSPI
QUESTION
I want to use https://github.com/abbr/nodesspi
I am trying to use justify instead of express. It looks like it should just work but it doesn't. Its pretty much the equivalent of the express snippet. I get an error at the authenticate function telling me I pass a wrong argument.
...ANSWER
Answered 2020-Aug-30 at 10:16The issue is that express like middle ware doesnt work on the fastify instance. The solution involves fastify-express
QUESTION
Before going to question, please note, I have tried many suggestions from stackoverflow as well as many other websites. There are many suggestions, but most of them truly dont solve this question straight.
My question in simple one sentence is, how to let my web server (which is a node js express based api) know, the logged windows user id (from my react js application) in an intranet application?
Till now I am able to write express based node js server which uses node-sspi library and provides me the windows user id and groups. This API is as simple as
...ANSWER
Answered 2020-Mar-10 at 14:29After researching finally got a breakthrough yesterday. So thought to answer my own question.
5 points to change in my example.
We need to refer both client and server with IP addresses or domains for communication purposes. So I changed all api calls origin mentions to their respective IP addresses.(localhost -> 192...)
In cors, we need to mention IP address and port number as origin
- In client side calls if we are using fetch use credentials: include or if axios use withCredentials: true
- In server, cors must know the origin, so include your clients ip with port
- Use either express-ntlm or node-sspi as your windows authenticator.
So Total change to my code in the example is,
In server side
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install NodeSSPI
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page