You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 [
/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'paths' => ['api/*', 'sanctum/csrf-cookie'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => true,
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
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
All reactions