Permalink
Browse files

Fix check for adding auth methods

  • Loading branch information...
mape committed Aug 17, 2011
1 parent 6e16be9 commit d32db3dd1f6d1d9e2f296e0c1ff01c7863535bfa
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/authentication.js
View
@@ -11,7 +11,7 @@ module.exports = function Server(expressInstance, siteConf) {
});
// Facebook
- if (siteConf.external.facebook) {
+ if (siteConf.external && siteConf.external.facebook) {
everyauth.facebook
.appId(siteConf.external.facebook.appId)
.appSecret(siteConf.external.facebook.appSecret)
@@ -20,7 +20,7 @@ module.exports = function Server(expressInstance, siteConf) {
}
// Twitter
- if (siteConf.external.twitter) {
+ if (siteConf.external && siteConf.external.twitter) {
everyauth.twitter
.myHostname(siteConf.uri)
.consumerKey(siteConf.external.twitter.consumerKey)
@@ -30,7 +30,7 @@ module.exports = function Server(expressInstance, siteConf) {
}
// Github
- if (siteConf.external.github) {
+ if (siteConf.external && siteConf.external.github) {
everyauth.github
.myHostname(siteConf.uri)
.appId(siteConf.external.github.appId)

0 comments on commit d32db3d

Please sign in to comment.