Closed zaidysf closed 2 years ago
Hi @zaidysf,
Thank you for using the Creative Tim products.
Can you please send us the .env files? This way we will be able to see more clearly what seems to be the issue.
Thank you, Team UPDIVISION
Hi @teamupdivision , Below are the .env files of both sides, I am using Laravel Sail for dockerizing laravel in local.
Nuxt
BASE_URL=http://localhost:3000
API_BASE_URL=http://localhost/api/v1
API_KEY=k39veVl71ppYenfr3mriTP8hJ7oSLx1s7ltq78Va
IS_DEMO=false
Laravel
APP_NAME="Sepetak POS"
APP_ENV=local
APP_KEY=base64:a+91Uec0eOQEK+UQkVRP/Ef4NZX9IBQ1vtLxI1F5GLw=
APP_DEBUG=true
APP_URL=
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=myforgeip
DB_PORT=3306
DB_DATABASE=sepetak_pos
DB_USERNAME=forge
DB_PASSWORD=myforgedbpassword
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
REDIS_HOST=redis
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=example@gmail.com
MAIL_PASSWORD=123123
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=example@gmail.com
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
Hi @zaidysf,
Thank you for sending over the .env files.
To solve your issue, the APP_URL variable from the API .env file should contain the URL of your Laravel JSON:API Project (eg. http://laravel-json-api-v2.test/) and the VUE_APP_API_BASE_URL should contain the URL of your Laravel JSON:API Project. (eg. http://laravel-json-api-v2.test/api/v1).
Please let us know if you need any additional information.
Best, UPDIVISION Team
Hi @teamupdivision , It still request like no end, here is what I changed
Laravel
APP_URL=http://localhost:3000
Hi @zaidysf,
The APP_URL should contain the URL of the API project. Please make sure you haven't used the one for the frontend project.
Please let us know if you still encounter issues.
Best, UPDIVISION Team
Hi @teamupdivision ,
OPTIONS
method called and give 204 result, but POST
method still request like no end, here is what I changed
Laravel
APP_URL=http://localhost
Edit: Laravel logs
[previous exception] [object] (GuzzleHttp\\Exception\\ConnectException(code: 0): cURL error 28: Operation timed out after 30000 milliseconds with 0 bytes received (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost/oauth/token at /var/www/html/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210)
Hi @zaidysf,
We're sorry to hear you're still encountering issues with your project.
From what we can see, you may have forgotten to install passport, or if you installed it, you did not add in the API .env the CLIENT_ID and CLIENT_SECRET.
Also, please make sure you followed all the steps described in the install documentation. You can find them below.
Should you need any extra information, please let us know.
Best, UPDIVISION Team
Hi @zaidysf,
Please let us know if you still encounter this issue and if we can help you in any other way.
Best, UPDIVISION Team
Prerequisites
Expected Behavior
Admin can login successfully
Current Behavior
It (/api/v1/login) run like no end
Steps to Reproduce
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
Failure Logs
Laravel Logs