Hi, I have implemented registerUser and loginUser functions. I am more often than not experiencing lost communication, and certain user information (that only applies to “logged in” users) just does not show up. I check the console when this happens and it appears that sometimes the user session token is different, but no error is reported. This may or may not be the cause. When I go to a different scene and go back to the previous screen, the correct information displays again. Here is what I see on the console:
May 27 04:35:15.530 result:
May 27 04:35:15.530 sessionToken: 78948d893ed105a88febdb4693a7aaf8
May 27 04:35:15.540 result:
May 27 04:35:15.540 sessionToken: 4c53e2a79ac2c1a96f4993b70d426916
May 27 04:35:15.540 error: Session expired
Here is a snippet of my code:
mc:setSessionToken()
mc:loginUser(userEmailCheck, userPasswordCheck, function( event1 )
if( signedIn == nil) or (signedIn == “0”) or (signedIn == “”) then
registerText(title, “New user? Register here”, -15, 220, 15, signUpEvent)
menuText(title, “Sign In”, -15, 180, 15, signInEvent)
end
– if not event1.error then
if( signedIn == “1”) then
– returnUser()
mc:getMe( function(e)
– if not e.error then
registerText(title, “G’day,”…" "…e.result.name, -15, 220, 15, myAccountEvent)
menuText(title, “View Account”, -15, 180, 15, myAccountEvent)
Please advise!
Thanks!
David