Adam Garbinski
Posts: 0
Joined: Sat Sep 28, 2013 5:33 pm

Some services not working when switching to library 2.1

Ok Evgene. Thank's for update.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Some services not working when switching to library 2.1

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

Adam Garbinski7377433
Posts: 0
Joined: Wed Feb 11, 2015 10:42 pm

Some services not working when switching to library 2.1

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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Some services not working when switching to library 2.1

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

Adam Garbinski7377433
Posts: 0
Joined: Wed Feb 11, 2015 10:42 pm

Some services not working when switching to library 2.1

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.

Adam Garbinski7377433
Posts: 0
Joined: Wed Feb 11, 2015 10:42 pm

Some services not working when switching to library 2.1

Hi Appery. Could anybody reply on this please?

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Some services not working when switching to library 2.1

Hello Adam,

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

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Some services not working when switching to library 2.1

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.

Adam Garbinski7377433
Posts: 0
Joined: Wed Feb 11, 2015 10:42 pm

Some services not working when switching to library 2.1

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?

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Some services not working when switching to library 2.1

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.

Return to “Issues”