Forum QuickConnect How to Prevent Multiple Logins for a User (SimpleUser Auth)

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

How to Prevent Multiple Logins for a User (SimpleUser Auth)

Postby JimLion » November 18th, 2014, 7:35 pm

It seems that users are currently allowed to log in twice. This is not good because the second user session is really messed up (BigDB calls don't come back). Also, a user should not be able to vs himself in the game...

So what is the correct way to handle this? Do I need to somehow check on login if the player is already logged in? I would think this should be an error generated on the authenticate method. Either that or the first user (sometimes called a ghost user) should be disconnected when the new user logs in.
JimLion
 
Posts: 73
Joined: June 17th, 2014, 3:35 am

Re: How to Prevent Multiple Logins for a User (SimpleUser Au

Postby SirGordon » May 18th, 2016, 11:04 pm

omg i vote this up
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: How to Prevent Multiple Logins for a User (SimpleUser Au

Postby JimLion » May 19th, 2016, 2:32 am

I know right. I posted this 2 years ago. :lol:
JimLion
 
Posts: 73
Joined: June 17th, 2014, 3:35 am

Re: How to Prevent Multiple Logins for a User (SimpleUser Au

Postby SirGordon » May 19th, 2016, 7:50 am

JimLion wrote:I know right. I posted this 2 years ago. :lol:


still not fixed? :S
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: How to Prevent Multiple Logins for a User (SimpleUser Au

Postby SirGordon » May 19th, 2016, 12:31 pm

"A user can be in several sessions simultaneously, so for example if you have a browser-based game and the same user opens it in two browser tabs, that will count as two simultaneous connections. But if this example user instead only has one window with the game and reloads it, which causes it to re-connect, that will count as two consecutive sessions, with the first ending just as the second one starts."
from https://playerio.com/documentation/serv ... erinsight/

So I guess it works as expected, isn't it?
SirGordon
 
Posts: 26
Joined: October 30th, 2013, 9:26 pm

Re: How to Prevent Multiple Logins for a User (SimpleUser Au

Postby ChristianD » May 19th, 2016, 7:55 pm

When you call Authenticate, you get back a Client that can be used to make further api calls as that user. This Client has no state, no open connection to the servers, and you can have multiple of these in your running game if you want. There are no limitations.

When you connect to a Multiplayer server, you get an open Connection back. But again, there might be reasons the game needs multiple connections to different rooms, so there are no limitations here either.

If a user can cheat or get an advantage when having multiple clients connected, that is something you need to address in your game logic. You can probably use BigDB to synchronize multiple clients, but this is something you need to build in a way that fits your game.

In general, always assume the client is compromised by hordes of hackers, and never trust it. Always run and verify as much of your game code as possible serverside.
Christian
ChristianD
.IO
 
Posts: 63
Joined: May 13th, 2016, 4:44 am


Return to QuickConnect



cron