Page 3 of 6

Some services not working when switching to library 2.1

Posted: Mon Feb 09, 2015 6:16 pm
by Adam Garbinski

Ok Evgene. Thank's for update.


Some services not working when switching to library 2.1

Posted: Tue Feb 10, 2015 5:26 pm
by Evgene Karachevtsev

Hello Adam,

[quote:]So my first question is what can I do about it?[/quote]
Please always make your user login before using predefined collections Files, Users, Devices
[quote:]What do you need to solve it?[/quote]
1) Set valid token to service header
2) Test your app with opened console
3) Open Network tab
OR
1) login in the app with opened console
2) open Network tab
3) find response for login and copy sessionToken
4) paste it to your service in test tab of your service
5) test your service


Some services not working when switching to library 2.1

Posted: Wed Feb 11, 2015 10:42 pm
by Adam Garbinski7377433

Helo Evgene,
I am a bit confused so my question is: DO I ALWAYS HAVE TO PROVIDE SESSION TOKEN before service request is send?
I have followed your advice and here are the results:

1) If I test my service, on the service test page, with valid session token it will run. It will also run if I test it with empty field "X-Appery-Session-Token" .
2) When I try to run the same service it in my app, with no session token provided, it fails and throws "Invalid session token" error. Why it is invalid when in fact there is no session token at all? (_SessionToken variable is empty).

As I said it only happens when I switch to lib 2.1, not happening in 1.2 lib version.
Any ideas why it works that way?


Some services not working when switching to library 2.1

Posted: Thu Feb 12, 2015 7:12 pm
by Evgene Karachevtsev

Hello Adam,

[quote:]DO I ALWAYS HAVE TO PROVIDE SESSION TOKEN before service request is send?[/quote]
Yes.
[quote:]Any ideas why it works that way?[/quote]
This is more secure way.
This is the one of the features that were implemented


Some services not working when switching to library 2.1

Posted: Thu Feb 12, 2015 9:24 pm
by Adam Garbinski7377433

OK. But does this mean that each time user opens my app he/she has to log into database? As far as I know there is no other way to get valid session token.


Some services not working when switching to library 2.1

Posted: Sat Feb 14, 2015 4:23 pm
by Adam Garbinski7377433

Hi Appery. Could anybody reply on this please?


Some services not working when switching to library 2.1

Posted: Sat Feb 14, 2015 9:51 pm
by Ihor Didevych

Hello Adam,

I will let you know when have more information from developers team.


Some services not working when switching to library 2.1

Posted: Sun Feb 15, 2015 2:51 am
by Illya Stepanov

Hi Adam -

[quote:]
OK. But does this mean that each time user opens my app he/she has to log into database? As far as I know there is no other way to get valid session token.
[/quote]

Yes, it is an identification method that checks if the user is exists in your database.


Some services not working when switching to library 2.1

Posted: Sun Feb 15, 2015 9:35 am
by Adam Garbinski7377433

Hi IIIya.
Sorry but I still do not get it. Right now they just open the app and use it. According to this new approach I would have to make them create new accounts and each time they open my app to log in. It is an app helping people with diabetes to calculate insulin doses. So more burden for them, apart from having much more to carry anyway. More so, personally I would have to create a new interface and user management panel... So not a good user and developer experience right? Really no other solution possible?


Some services not working when switching to library 2.1

Posted: Tue Feb 17, 2015 4:25 pm
by Evgene Karachevtsev

Hello Adam,

Could you please clarify why do you need the DB? If your application is used only for the calculations, then login and password are superfluous, but save in the DB isn't need too. If you need to save the previous calculations, they should be separated, a user don't need to see the information of other users.