colinskow / superlogin

Powerful authentication for APIs and single page apps using the CouchDB ecosystem which supports a variety of providers.
MIT License
370 stars 116 forks source link

restify #143

Open hurshprasad opened 7 years ago

hurshprasad commented 7 years ago

I am wondering if anyone has tried to deploy this using restify vs. express? Is it interoperable or not?

If not does anyone know which issues you would face if it was attempted?

colinskow commented 7 years ago

I don't know a lot about Restify, but I don't see why SuperLogin shouldn't work. It seems to use the same MiddleWare pattern. You may need to re-write some of the routes.

webnoob commented 6 years ago

I've just been trying this myself and it certainly doesn't work out of the box. Restify doesn't support app.use('/auth', superlogin.router) syntax to register the routes.

A work around to get routes registered is here but this also causes it's own problems in that the routes that are registered use res.send(code).json() and in restify send() doesn't support .json()

At this point I went back to express :)

viko42 commented 5 years ago

webnoob

res.send from restify is already in JSON