Hybrid View
-
21 Oct 2012 10:26 AM #1
Unanswered: Sencha Touch 2 Session problem
Unanswered: Sencha Touch 2 Session problem
I am calling the APIs of my web-service to run the Sencha touch application.
When I hit the login API directly from browser, it sets the SESSION variable that I can access later.
But when I call the same API diagrammatically from my Sencha Touch Application it logs me in successfully but it doesn't set the SESSION variables. i.e. I cannot access the session variables in further APIs.
I am not sure if the problem is on Client side or on Server side. Any thoughts?
(Using Coldfusion as server side language)
-
21 Oct 2012 1:18 PM #2
Fixed !!
In response of Login API I also returned #SESSION.CFID# and #SESSION.CFTOKEN#
Now with every API I am sending these variable: ?CFID=123&CFTOKEN=334455
And finally the Coldfusion can recognize my session
-
11 Mar 2013 3:35 AM #3
This information might be useful to others.
when making an ajax request to cross domain session state is not maintained.
you need something like this.
more info hereCode:Ext.Ajax.request({ url: 'http://myurl/log_user_in.json', params: { username: user, password: pass, app_id: id }, withCredentials: true, useDefaultXhrHeader: false, method: "POST" })
http://stackoverflow.com/questions/1...g-ajax-request


Reply With Quote