I'm trying to use everyauth to handle authentication for a rest api created with restify. But can't find a starting point. I'd expect to be doing something like:
var restify = require('restify');
var everyauth = require('everyauth');
var server = restify.createServer();
server.use(everyauth.middleware());
but restify does not accept the everyauth middleware.
How do I go about setting up restify and everyauth?
The issue you are having is restify does not and current will not have a middleware layer.
The below is from the author of restify
What you can do is use connect and add the restify server on top of that, then you can use connect to manage your middleware like everyauth.
Here is a great sample of this, I have it working great on my system as-is.
https://gist.github.com/2140974
Then you can add everyauth to connect as per the documents.
Hope that helps.