authToken question

After calling coronaCloud.loginAPI, does the token get stored somewhere?

I call loginAPI, and get a token returned, but then the next call I want to use (getMyUnlockedAchivements) bombs with an error stating that there was no token.

Do I have to pass that in somehow?  I tried using setAuthToken and then calling getMyUnlockedAchivements, but I get the same result.

thanks

It should be stored in coronaCloud.authToken. 

There should be a pair of print statements:

“User Logged In!”

"Auth Token: "…coronaCloudController.authToken

that shows up when you call loginAPI().

Just make sure that your not using two different names for your cloud stuff… That is in one module do you coronaCloud = require("…") and in another you do cloud = require("…") or else you end up with two different objects.

Thanks Rob,

I did some more checking after you sent this, and it appears it’s my fault  :stuck_out_tongue:

I did a loginAPI and the next statement I started calling getMyUnlockedAchivements.  I needed to wait for loginAPI to trigger my event handler and call the achievement call from there.  

Made that change and it appears to be working.

Thanks!

It should be stored in coronaCloud.authToken. 

There should be a pair of print statements:

“User Logged In!”

"Auth Token: "…coronaCloudController.authToken

that shows up when you call loginAPI().

Just make sure that your not using two different names for your cloud stuff… That is in one module do you coronaCloud = require("…") and in another you do cloud = require("…") or else you end up with two different objects.

Thanks Rob,

I did some more checking after you sent this, and it appears it’s my fault  :stuck_out_tongue:

I did a loginAPI and the next statement I started calling getMyUnlockedAchivements.  I needed to wait for loginAPI to trigger my event handler and call the achievement call from there.  

Made that change and it appears to be working.

Thanks!