Outlined changes that need to be made to prevent users from having multiple sessions.

This commit is contained in:
perroned 2014-08-08 06:09:39 -07:00
parent 72cd8c1050
commit 43f3a041f8
2 changed files with 10 additions and 2 deletions

View File

@ -33,7 +33,15 @@
console.log "authToken=" + authToken
if meetingId? and userId? and authToken?
Meteor.call("validate", meetingId, userId, authToken)
# Here we need to check whether there is already a user using userId inside meetingId, if there is don't let this user log in, it is a duplicate
###
if Meteor.call("validateUserId", meetingId, userId)
continue
else
kick user out
###
Meteor.call("validateAuthToken", meetingId, userId, authToken)
Meteor.call('sendMeetingInfoToClient', meetingId, userId)
else
console.log "unable to extract from the URL some of {meetingId, userId, authToken}"

View File

@ -1,5 +1,5 @@
Meteor.methods
validate: (meetingId, userId, authToken) ->
validateAuthToken: (meetingId, userId, authToken) ->
Meteor.redisPubSub.sendValidateToken(meetingId, userId, authToken)
userLogout: (meetingId, userId) ->