AbanteCart Development > API Development

not logged in?

(1/3) > >>

pyroxide:
I'm having trouble with my customer API. Immediately after getting a successful login response and parsing the token from it, the cart says that I am not logged in. I'm using version 1.2.2.

my log is attached.

pyroxide:
I discovered that the test_api.php works on my web server but I am still having trouble with the login from my app.

eCommerce Core:
Do you have HTTPS enabled?
Can you post exact request and response?

pyroxide:
using SSL

this is my log:

POSTed login form:
URL: https*
rt=a/account/login
email=my e-mail
password=password
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:791)

{"status":1,"success":"Logged in","token":"43c3ed78a8b12bc7d01f6193cd47cafe"}
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:792)

token=43c3ed78a8b12bc7d01f6193cd47cafe
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:806)

verifying still logged in..
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:814)

POSTed login form:
URL: https*
rt=a/account/login
token=43c3ed78a8b12bc7d01f6193cd47cafe
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:821)

HEADERS: STATUS=HTTP/1.1 401 Unauthorized
DATE=Thu, 11 Jun 2015 11:48:29 GMT
SERVER=Apache
X-POWERED-BY=PHP/5.3.29
EXPIRES=Thu, 19 Nov 1981 08:52:00 GMT
CACHE-CONTROL=no-store, no-cache, must-revalidate, post-check=0, pre-check=0
PRAGMA=no-cache
ACCESS-CONTROL-ALLOW-ORIGIN=
ACCESS-CONTROL-ALLOW-CREDENTIALS=true
SET-COOKIE=currency=USD; expires=Sat, 11-Jul-2015 11:48:29 GMT; path=/; domain=www.*.com
TRANSFER-ENCODING=chunked
CONTENT-TYPE=application/json

UnityEngine.Debug:Log(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:832)

{"status":0,"request":"unauthorized"}
UnityEngine.MonoBehaviour:print(Object)
<PostLogin>c__Iterator4:MoveNext() (at Assets/Scripts/RequestController.cs:834)

eCommerce Core:
When you do login request and later you pass the token, are these both requests sent via HTTPS to the same domain?

Navigation

[0] Message Index

[#] Next page

Go to full version
Powered by SMFPacks Social Login Mod