Page 1 of 1

Advanced features of login-assistant

Posted: 16 Nov 2015, 17:08
by hoanghuybao
Hi admin,

I see that we can set some extra fields after the credentials have been checked in server side.
Document:http://docs2x.smartfoxserver.com/DevelopmentBasics/login-assistant

Code: Select all

 // Store avatar in session object
            loginData.session.setProperty("avatar", avatarPic)
             
            // Set client as Moderator
            if (isMod)
                loginData.session.setProperty("$permission", DefaultPermissionProfile.MODERATOR);

However, How to client side can get thoes extra fields?

Thanks,

Re: Advanced features of login-assistant

Posted: 17 Nov 2015, 15:17
by Lapo
Hi,
the loginData parameter contains a field called clientOutGoingData of type SFSObject.
You can populate it with all the necessary data you want the client to receive in the login response.

Hope it helps

Re: Advanced features of login-assistant

Posted: 17 Nov 2015, 16:27
by hoanghuybao
Thanks for your help. It is very helpful. :D