checkSecurePassword not working?

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

Moderators: Lapo, Bax

Vygar
Posts: 3
Joined: 13 Jan 2021, 01:36

checkSecurePassword not working?

Postby Vygar » 13 Jan 2021, 01:41

Hello,

I've recently started diving into SmartFox and in the process of learning how this system works. At this point, I am attempting to set-up authentication via database which seems very straight forward. However, I am running into an issue where the checkSecurePassword function never validates a password. I have confirmed that the password value being sent from the client (Unity) is the same as the value contained in the database. The value is retrieved from the database as expected but when passed to the checkSecurePassword with the session object reference and encrypted password, they still don't validate. I'm stuck at this point.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: checkSecurePassword not working?

Postby Lapo » 13 Jan 2021, 07:33

Hi,
I would recommend following this tutorial:
https://smartfoxserver.com/blog/custom- ... -database/

If you still have problems show us the code that is not working for you and any relevant errors (if any).

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
Vygar
Posts: 3
Joined: 13 Jan 2021, 01:36

Re: checkSecurePassword not working?

Postby Vygar » 13 Jan 2021, 20:13

I got it figured out. I was simply a cadence problem on my end; apparently sending a login request before the connection request was completed. Thanks!
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: checkSecurePassword not working?

Postby Lapo » 14 Jan 2021, 10:35

Hi,
yes, you need to wait the SFSEvent.CONNECTION event before attempting to log in.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: Baidu [Spider] and 71 guests