CustomLogin Problem

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

alex2344
Posts: 3
Joined: 30 Oct 2018, 12:04

CustomLogin Problem

Postby alex2344 » 30 Oct 2018, 13:40

I know this kind of questions is old , But I'm really stuck :!:
When I use "customLogin" the data Come this way

13:29:08.547 - [ INFO ] > { DATA IN } : <msg t='sys'><body action='login' r='0'><login z='test1'><nick><![CDATA[test]]></nick><pword><![CDATA[28e73f24096dcb80b9cca97809a4ee88]]></pword></login></body></msg>

[main.as]: Event received: loginRequest

13:29:08.555 - [ FINE ] > User [ test ] logged in

13:29:08.562 - [ INFO ] > { DATA OUT } : <msg t='xt'><body action='xtRes' r='-1'><![CDATA[<dataObj><var n='uid' t='n'>1</var><var n='name' t='s'>test</var><var n='mod' t='b'>0</var><var n='_cmd' t='s'>logOK</var></dataObj>]]></body></msg>

the data out should be like this :

<msg t='sys'><body action='logOK' r='0'><login n='test' id='0' mod='0'/></body></msg>.

I do not know the problem from where

I use sfs pro with flash and the secureLogin ext
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: CustomLogin Problem

Postby Lapo » 31 Oct 2018, 08:18

Hi,
it looks like the response you're getting is correct.
Take a look at this tutorial:
https://www.smartfoxserver.com/docs/1x/ ... /index.htm

I am not sure why you're expecting this:

Code: Select all

<msg t='sys'><body action='logOK' r='0'><login n='test' id='0' mod='0'/></body></msg>.


If you're using a custom login the response will come from the Extension itself.
Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
alex2344
Posts: 3
Joined: 30 Oct 2018, 12:04

Re: CustomLogin Problem

Postby alex2344 » 31 Oct 2018, 17:25

When I use a non-custom login the data Come like this

Code: Select all

16:17:14.413 - [ INFO ] > { DATA IN } : <msg t='sys'><body action='login' r='0'><login z='test1'><nick><![CDATA[test]]></nick><pword><![CDATA[00fe66d261033e92bda01a4b5547ede2]]></pword></login></body></msg>
16:17:14.416 - [ FINE ] > User [ test ] logged in
[color=#FF0000]16:17:14.417 - [ INFO ] > { DATA OUT } : <msg t='sys'><body action='logOK' r='0'><login n='test' id='1' mod='0'/></body></msg>[/color]

And then everything works well

and when i use a custom login the data out must be 'xtRes' only if login fails :

Code: Select all

<msg t='xt'><body action='xtRes' r='-1'><![CDATA[<dataObj><var n='err' t='s'>fail</var><var n='_cmd' t='s'>logKO</var></dataObj>]]></body></msg>

But if login is successful I want to send something like this

Code: Select all

<msg t='sys'><body action='logOK' r='0'><login n='test' id='1' mod='0'/></body></msg>.


I really appreciate your help
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: CustomLogin Problem

Postby Lapo » 31 Oct 2018, 18:39

Hi,
but that's not how it works in SFS PRO, using a custom login. I highly recommend that you check the article I linked in my previous post.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
alex2344
Posts: 3
Joined: 30 Oct 2018, 12:04

Re: CustomLogin Problem

Postby alex2344 » 31 Oct 2018, 19:35

i did it with

Code: Select all

_server.sendGenericMessage


Thanks

Return to “SmartFoxServer 1.x Discussions and Help”

Who is online

Users browsing this forum: No registered users and 25 guests