I found the answer located here really helpful in this regard: Send custom data along with handshakeData in socket.io?Send custom data along with handshakeData in socket.io?
Also brushing up on the following documentation helps explain ways to tie variables to the handshake object which can be accessed from the socket object during the connection: https://github.com/LearnBoost/socket.io/wiki/Authorizing#global-authorization