creativetimofficial / ct-vue-material-dashboard-laravel-pro-bs4

Vue SPA Material template connected to working Laravel REST API with the help of json:api standard
7 stars 2 forks source link

Fresh installation keeps "Pending" status on login when valid credentials are used #15

Closed jorgev121 closed 1 year ago

jorgev121 commented 1 year ago

Prerequisites

Please answer the following questions for yourself before submitting an issue.

Expected Behavior

To let using the correct credentials to log in.

Current Behavior

Same as https://github.com/creativetimofficial/ct-vue-material-dashboard-laravel-pro/issues/6 If credentials are OK, it keeps in pending. If credentials are wrong, it works as it should.

Failure Information (for bugs)

It keeps in "Pending" status forever, until I shutdown Laravel's server.

Steps to Reproduce

Just a new installation following the documentation.

Context

Failure Logs

Request to Laravel's API. No logs available.

teamupdivision commented 1 year ago

Hello,

Thank you for using Create TIM products!

Could you please send us some screenshots with the errors you are getting in the console and the .env file?

Thank you.

jorgev121 commented 1 year ago

There's no error that I can take a Screenshot, it just keeps pending when I click on login button (with the right credentials). If wrong credentials are set, it gives me the error and response immediately.

This is the Vue .env VUE_APP_BASE_URL=http://localhost:8080/ VUE_APP_API_BASE_URL=http://localhost:8000/api/v1 VUE_APP_API_KEY= VUE_APP_IS_DEMO=

This ios the Laravel's .env APP_NAME=Laravel APP_ENV=local APP_KEY=... APP_DEBUG=true APP_URL=

LOG_CHANNEL=stack

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=vue-laravel DB_USERNAME=... DB_PASSWORD=...

BROADCAST_DRIVER=log CACHE_DRIVER=file QUEUE_CONNECTION=sync SESSION_DRIVER=file SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1 REDIS_PASSWORD=null REDIS_PORT=6379

MAIL_DRIVER=smtp MAIL_HOST=smtp.mailtrap.io MAIL_PORT=2525 MAIL_USERNAME= MAIL_PASSWORD= MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS=null 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}"

PASSPORT_PERSONAL_ACCESS_CLIENT_ID=1 PASSPORT_PERSONAL_ACCESS_CLIENT_SECRET=Nt3X...k0IG

CLIENT_ID=2 CLIENT_SECRET=hL...kBIW

El jue, 23 feb 2023 a las 5:17, Updivision Team @.***>) escribió:

Hello,

Thank you for using Create TIM products!

Could you please send us some screenshots with the errors you are getting in the console and the .env file?

Thank you.

— Reply to this email directly, view it on GitHub https://github.com/creativetimofficial/ct-vue-material-dashboard-laravel-pro/issues/15#issuecomment-1441583644, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH2JDFKINIOJ5V2VURSIZBLWY5BN5ANCNFSM6AAAAAAVEPLH2M . You are receiving this because you authored the thread.Message ID: <creativetimofficial/ct-vue-material-dashboard-laravel-pro/issues/15/1441583644 @github.com>

teamupdivision commented 1 year ago

Hello,

From what we can see you need to set VUE_APP_API_BASE_URL to you api link not localhost:8000.

Let us know if that works

Thank you.

jorgev121 commented 1 year ago

Yes, but http://localhost:8000/api/v1 is the link of my API (Artisan Serve command)

teamupdivision commented 1 year ago

Hello,

You cannot run both projects on the same port.

You can check the documentation to see that you should not use php artisan serve, you should use apache or nginx.

Let us know if that helped.

jorgev121 commented 1 year ago

They were not in the same port (8000 and 8080). But avoiding the SERVE command makes it work. Thanks.