#Socket IO authentication

4 messages · Page 1 of 1 (latest)

green tree
#

Hi you beautiful people,

I want to implement authentication in my socket io application. it's for a game server. what's best practice? i can't seem to find good resources online. I have little to no boilerplate thus nothing to show yet really.

Thanks!

tough steeple
#

The usual authentication model?

Send credentials such as username/pass, server sends back a session token, and stores that session token in memory or DB with the user ID, log in time, etc

#

When the client makes a request the server checks the session, if not valid sends back an auth failed message

green tree
#

Appreciate you!