Login after roomlist

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

Post Reply
aava
Posts: 17
Joined: 19 Aug 2008, 04:31
Contact:

Login after roomlist

Post by aava »

Hi All

We are developing an application where we need to show the room list first, on clicking of any room from the list a login window should appear.
Please guide us on this. is it possible ?

A dev from CL.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login after roomlist

Post by Lapo »

Hi,
normally this is not possible. You need to be connected and logged in to access the Room data and from a security perspective what you're asking is a bit funky, because it allows anyone to ask a room list, which has some security implications.

Besides that you could publish a Room List to an HTML page by integrating such data into the SFS2X web server. People could freely go that web page see the list and then decide to connect.

We have an article on how to integrate the two things here:
http://smartfoxserver.com/blog/?p=378

hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
hfcgII
Posts: 7
Joined: 10 May 2016, 07:26

Re: Login after roomlist

Post by hfcgII »

Hi!

Would it not be possible to simply auto-connect the user using some identifier (dev id / ip ) or as guest and than make him login into a password protected room? Or let the application let him/her login if clicked on a room and once logged in via the application, the user could than be logged in into a password protected room. Or better yet, if the application handels the login, the guest can be logged out as a guest and logged in again using those credentials whilst connecting directly to that specific room. To add some security, you could add the user to some groups to limit what rooms they can see.

Hanns
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Login after roomlist

Post by Lapo »

Yes you can login a user as a guest. This means any client providing no name and no password can login.
This already poses a security risk. Because a malicious user will be allowed to login, potentially hundreds of times without any checks. Once he has done this he can bombard the server with requests and slow it down, congest the network and even crash it if he has enough resources.

You will at least need to configure the Guest user so that he can't create any new Rooms, nor call server side Extensions etc... This can be done via the Privilege Manager.
http://docs2x.smartfoxserver.com/Advanc ... ge-manager

Other users, logged with higher privileges will still be able to do this. As regards joining password protected Rooms, yes it can be done, after having logged into the server.
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply