0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00
ghost/core/server/auth/index.js
Katharina Irrgang 319a388277 ghost auth: sync email (#8027)
*   ghost auth: sync email

refs #7452

- sync email changes in background (every hour right now)
- sync logged in user only!
- no sync if auth strategy password is used
- GET /users/me is triggered on every page refresh
- added TODO to support or add long polling for syncing data later
- no tests yet on purpose, as i would like to get a basic review first

* 🐩  use events

- remember sync per user
2017-02-23 18:04:24 +00:00

21 lines
568 B
JavaScript

var passport = require('./passport'),
authorize = require('./authorize'),
authenticate = require('./authenticate'),
sync = require('./sync'),
oauth = require('./oauth'),
ghostAuth = require('./ghost-auth');
exports.init = function (options) {
oauth.init(options);
sync.init(options);
return passport.init(options)
.then(function (response) {
return {auth: response.passport};
});
};
exports.oauth = oauth;
exports.authorize = authorize;
exports.authenticate = authenticate;
exports.ghostAuth = ghostAuth;