Sign In Register

How can we help you today?

Start a new topic
Answered

problem with "User Password Change"

i was following this :

https://docs.gamesparks.com/tutorials/social-authentication-and-player-profile/automating-user-password-change.html

in test harness i am trying this:

 

{
    "@class":   ".AuthenticationRequest",
    "password": "ffff",
    "userName": "ffff",
    "scriptData":   {
        "action":   "passwordRecoveryRequest",
        "email":    "muzaheed57@gmail.com"
    },
    "requestId":    "1479401743_2"
}

  but it is not entering inside of this   if(Spark.data.scriptData){}


somehow it always considering "(Spark.data.scriptData)"  as invalid !!!!!!!!

can anybody provide some example code for testing in test harness?





Best Answer

Hi Ahsan, 


I've copied your request and tried it in my test harness and it works as intended. Can you place this code at the top of your Cloud code and see if the data is actually available :


var test = Spark.getData();

1+1;


If you test the code in the harness debugger and move to the second line with 1+1 you should be able to see the 'test' object be created on the right hand side and will be able to see if your data is actually there. 


Here's a demonstration:


VdhZgSv1Po-h32i--Ozoa8A5-mFkmK_iHg.png


Please double check this and get back to me, will be here to assist further. 


Cheers,

Omar


Answer

Hi Ahsan, 


I've copied your request and tried it in my test harness and it works as intended. Can you place this code at the top of your Cloud code and see if the data is actually available :


var test = Spark.getData();

1+1;


If you test the code in the harness debugger and move to the second line with 1+1 you should be able to see the 'test' object be created on the right hand side and will be able to see if your data is actually there. 


Here's a demonstration:


VdhZgSv1Po-h32i--Ozoa8A5-mFkmK_iHg.png


Please double check this and get back to me, will be here to assist further. 


Cheers,

Omar

i. sorry for late answer. i am in the transaction of moving to ane country. so a bit busy at the moment.

i placed the cloud code into aurthentication response filed instead of aurthentication
 request.
since i found out the problem iwas not able to sit down with it.
hopefully tonight i will have time.will inform u if i hvaing any poroblem. 

thanks for your replay

You're welcome.


I hope your transition is most comfortable. Waiting to hear from you.


Cheers,

Omar

Login to post a comment