Put Ghost behind a login

If you’re looking for some help, it’s important to provide as much context as possible so that people are able to assist you. Try to always mention:

I am trying to see how I can put a login screen in front of a self-hosted Ghost install. What server is Ghost using under the hood and is it possible to use something like passportjs.org (which integrates with Express server seamlessly). Are there integration points that one could use to introduce a login and authentication layer in front of Ghost? Any help would be greatly appreciated.

Thank you,

Ghost does use express for routing, and it uses oAuth for authentication (using passport + extensions). You could probably hack the core to implement additional authentication, or you could also use something like subrequest authentication, although that would require you to deploy your own authentication mechanism

Thanks for the info. Going to look into nginx subrequest authentication, but wondering if its possible to use passport w/o having to hack the core. I noticed that the ghostServer takes in an express instance, as seen in the main Ghost repo (https://github.com/TryGhost/Ghost/blob/master/index.js).

I am currently using the Ghost-on-Heroku repo (https://github.com/cobyism/ghost-on-heroku), which has its own server.js to launch Ghost on Heroku. I am wondering if its possible to utilize this to introduce passport to support authentication.

You could definitely use Ghost as an NPM module, and add additional authentication as you wish, but the Ghost Team has said quite often that Ghost is meant to be a standalone service, and not recommended to use it as an NPM module

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.