Skip to content

Commit

Permalink
issue 53, falls back to a default login method for peakboo if no sett…
Browse files Browse the repository at this point in the history
…ings are defined
  • Loading branch information
Andrew Wilson committed Nov 15, 2018
1 parent 9fef4d6 commit 968b99d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions server/methods.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@ Meteor.methods
getLogins: () ->
logins = Meteor.settings.logins
loginMethods = []

for own login, settings of logins
if settings.active
loginMethods.push 'loginWith' + login.charAt(0).toUpperCase() +
login.slice(1).toLowerCase()
if logins
for own login, settings of logins
if settings.active
loginMethods.push 'loginWith' + login.charAt(0).toUpperCase() +
login.slice(1).toLowerCase()
else
console.log "The login method is not defined in the settings. Using loginWithPassword"
loginMethods.push 'loginWithPassword'

loginMethods

Expand Down

0 comments on commit 968b99d

Please sign in to comment.