javascript - Keep unlogged meteor user while redeploying? -


at moment i'm using this.connection.id unique identifier, every time application deployed ( using meteor-up ) client refreshes ( using autoupdate package ) page , create new subscription therefore creating new connection.id.

my first idea thought keep unique id on client, but:

  • i'm afraid bring security issues?

    • one user pretend 1 forging "cookie"/localstorage?
  • if user open 2 tabs perceived 1 session ?

    • ideally each tab should have own session

another idea turn autopublish off, means mobile devices might keep , old client version long time?

client code

meteor.subscribe 'my_channel', -> console.log "client subscribed" 

server code

meteor.publish 'my_channel', ->      id = @connection.id      console.log "user #{@connection.id} on"      @_session.socket.on 'close', ->          console.log "user #{@id} off"  meteor.methods       hello: ->         console.log "hello! know are! #{@connection.id}" 


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -