Is created user logged in? And More questions...

0 votes
Hi All

I have questions. But cannot find answers quickly and easily:(

1-) I create user. Is it a authenticated user by default? Or should I call Authenticate api after I create user?

2-) I want to get password of User in the callback of "CreateUser" api call. But it always returns null ! Why?

3-) I want user to be stay logged in next time he/she opens app. Same question here: http://forum.shephertz.com/?qa=1061/keep-user-logged-they-dont-have-always-log-back-when-they-open Person says save sessionId in player prefs, but he does not say what to do with it? Is this feauture added to sdk?

Please guys, please please improve your examples!!!! No example at all in App42!!!
asked Feb 22, 2016 in Unity by gokhan (20 points)

1 Answer

0 votes

Hi Gokhan,

Please find my answer inline for your query:

1-) I create user. Is it a authenticated user by default? Or should I call Authenticate api after I create user?
Ans: Yes, you will get User object in the success of createUser function which contain user information as well as his session id. 
2-) I want to get password of User in the callback of "CreateUser" api call. But it always returns null ! Why?
Ans: We don't return password on method response. If you require it for further use, you need to save it locally. 
3-) I want user to be stay logged in next time he/she opens app. Same question here:http://forum.shephertz.com/?qa=1061/keep-user-logged-they-dont-have-always-log-back-when-they-open Person says save sessionId in player prefs, but he does not say what to do with it? Is this feauture added to sdk?

Ans: Session id helps you in different-2 scenario like when you are calling App42 API, you need to set session id in method call to define who is making App42 Call. Please have  a look at this link which will help you in details and let me know if it helps.

 

Regards,

Himanshu Sharma

answered Feb 22, 2016 by hs00105 (2,005 points)
edited Feb 23, 2016 by hs00105
Hi Himanshu
I didnt understand how my question is related to writing custom code(link you send above). Bro, ok I get sessionId. I saved it to playerprefs. Then what should I do to keep user logged in?
Hi Gokhan,

Apologies for wrong URL, please find link (http://api.shephertz.com/tutorial/Securing-Your-App/?index=security-acl) which have the complete details that why session id is require to make App42 calls:

Regards,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...