You might be in the wrong place
You probably want to use https://github.com/LDSorg/lds-connect-demo-angular-node.
I just separated this module for the fun of it. You can use it on its own, but I didn't expect that anyone would.
lds-connect-proxy-node
This proxy's the lds-connect API in your app so that your front-end javascript
(and, in particular, angular-lds-connect
) can make calls to ldsconnect.org.
In the future, when ldsconnect.org supports CORS (and employs the proper security measures), this module will not be necessary.
Questions? Comments? Leave an issue or join the discussion on Google Groups
Install
npm install --save passport-lds-connectnpm install --save lds-connect-proxy
Usage
server.js
:
var ldsConnectProxy ; { // flavor to the way you handle sessions in your app return requser && requseraccessToken;} { return requser && requserldsId;} ldsConnectProxy = ; // Express; // Connect// if (!connect.router) { connect.router = require('connect_router'); }// app.use(connect.router(ldsConnectProxy));
In order to get an access token in the first place you will need to use passport-lds-connect. See https://github.com/LDSorg/lds-connect-demo-angular-node for example usage.