Keep getting Unauthenticated response after login : server #68
Unanswered
baneetsharma
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am using
getcandy-hub version: 0.12.11
candy-api version: ^0.12
and is using pm2 to run this on server.
when I am trying to login using login API call, it is giving me 204 response, but right after that there is another call going to
siteurl/api/v1/users/current?include=customer.customerGroups,roles.permissions
which keeps returning me {"message":"Unauthenticated."} response .
Update
I made this work but now right after this call I am facing another issue : I am getting CORS issue.
This is what my config/cors.php looks like
`return [
]; `
API env values
APP_URL=https://myshopagent.com
SESSION_DOMAIN='myshopagent.com'
SANCTUM_STATEFUL_DOMAINS = 'admin.myshopagent.com:3000,admin.myshopagent.com,myshopagent.com:3000,localhost:3000,localhost,127.0.0.1,127.0.0.1:8000,::1'
Hub env values
API_BASE=https://myshopagent.com/api/v1
SANCTUM_URL=https://myshopagent.com/api
PRODUCT_PREVIEW_URL=http://storefront.test/products/preview/:id
PRODUCT_LIVE_URL=http://storefront.test/products/preview/:slug
CATEGORY_PREVIEW_URL=http://storefront.test/categories/preview/:id
COLLECTION_PREVIEW_URL=http://storefront.test/collections/preview/:id
Any idea what I am doing wrong.
Any help would be helpful.
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions