Using same UserId to connect to Photon Chat
Options
in Photon Chat
Hey there,
Is there any way to detect whether a second device is trying to connect with the same UserId in order to prevent this from happening?
Thanks and regards,
Andrew
Is there any way to detect whether a second device is trying to connect with the same UserId in order to prevent this from happening?
Thanks and regards,
Andrew
0
Comments
-
right now this is not possible0
-
By any chance:
- Do you have this in the works?
- Is it possible to achieve this directly with Photon Realtime?
0 - Do you have this in the works?
-
well, there is support for SingleConnection mode, but it works for entire cloud, not per application. in the future we are going to support this on per application basis
>>Is it possible to achieve this directly with Photon Realtime?
did Not really get what you mean
0 -
Thanks!
I will checkout SingleConnection mode: any docs on this?
As for the photon realtime question: We make use of PUN+ in Unity - I meant to ask whether it was possible to detect this using PUN+.0 -
>I will checkout SingleConnection mode: any docs on this?
you will not find this in any docs. because chat server code is not open.
In PUN you may not do this too. but may be you may apply next trick.
When you join chat, you may send status update with some data. if second connection exists it will get this status update and this case you may close this connection. or send update back so, that second connection will be closed
you may use Inivisible status with message. it should work for you i think0 -
Thanks @chvetsov we'll try it out0
-
@chvetsov Implemented as suggested and it works! Thanks!
If possible in the future, as a nice to have, it would be nice to have a way to query.
Thanks again.0 -
we are thinking about providing way to setup this using application dashboard. Our idea is that you may select whether to allow multiple connection or not
is this suitable for your application?0 -
It would be ideal to make some sort of functionality to disable or enable whether you want a user to be able to login to the same account (on more then 1 machine), however it isn't ideal for multiplayer games where you need to login to your account and use your account data. What im getting at is, if the userId != null, no one else can log in with that account.0
-
got it. Thank you for your feedback0
-
Please, give at least some hint on how to implement Server SDK 4.00
-
not sure what you mean0