creativetimofficial / ct-vue-now-ui-dashboard-pro-laravel

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

vue-now-ui-dashboard-pro-laravel Login Issue #1

Closed ghost closed 2 years ago

ghost commented 2 years ago

Prerequisites

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

Expected Behavior

Expected behaviour should be working properly with login credentials

Current Behavior

Currently Not able to get login in the dashboard

Failure Information (for bugs)

It simply shows invalid credentials even though I have tested the credentials in the DB too.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

Laravel API Project Installation

Navigate in your Laravel API project folder: cd your-laravel-json-api-project Install project dependencies: composer install Create a new .env file: cp .env.example .env Add your own database credentials in the .env file in DB_DATABASE, DB_USERNAME, DB_PASSWORD Create users table: php artisan migrate --seed Generate application key: php artisan key:generate Install Laravel Passport: php artisan passport:install

Vue Now UI Dashboard Project Installation Navigate to your Vue Now UI Dashboard project folder: cd your-vue-now-ui-dashbord-project Install project dependencies: npm install Create a new .env file: cp .env.example .env VUE_APP_BASE_URL should contain the URL of your Vue Now Ui Dashboard Project (eg. http://localhost:8080/) VUE_APP_API_BASE_URL should contain the URL of your Laravel JSON:API Project. (eg. http://localhost:3000/api/v1) Run npm run dev to start the application in a local development environment or npm run build to build release distributable.

admin type - [admin@jsonapi.com] with the password secret

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

Please include any relevant log snippets or files here. Vue-Now-UI-Dashboard-PRO-Laravel-by-Creative-Tim-UPDIVISION

teamupdivision commented 2 years ago

Hello,

Thanks for reporting this issue and for using Creative Tim products.

Could you please send the .env for both the frontend and backend, please?

Thank you.

All the best, Adrian.

ghost commented 2 years ago

Hi Adrian,

Yeah sure, PFA

Regards: Pardeep Rawat

On Mon, 26 Sept 2022 at 18:12, Updivision Team @.***> wrote:

Hello,

Thanks for reporting this issue and for using Creative Tim products.

Could you please send the .env for both the frontend and backend, please?

Thank you.

All the best, Adrian.

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

teamupdivision commented 2 years ago

Hello,

My apologies, i cannot seem to find the attached files could you please try sending them again?

Thank you.

All the best, Adrian

ghost commented 2 years ago

Hi Adrian,

PFA

Regards: Pardeep Rawat

On Tue, 27 Sept 2022 at 11:55, Updivision Team @.***> wrote:

Hello,

My apologies, i cannot seem to find the attached files could you please try sending them again?

Thank you.

All the best, Adrian

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

teamupdivision commented 2 years ago

Hello,

I still cannot see them could you please send the files from the github issues link?

https://github.com/creativetimofficial/ct-vue-now-ui-dashboard-pro-laravel/issues/1

Thank you.

ghost commented 2 years ago

Hi Adrian,

I am not able to attach the file here as well so I am pasting the code here of both the files.

Laravel env file code:

APP_NAME=Laravel APP_ENV=local APP_KEY=base64:H3mz38XaVPiXAbzu6EvBvlGq+2+unZNcR+FVJnGHY5k= APP_DEBUG=true APP_URL=

LOG_CHANNEL=stack

DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravelvue_db DB_USERNAME=root 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=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null 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}"

Vue env file code:

VUE_APP_BASE_URL=http://localhost:8080/ VUE_APP_API_BASE_URL=http://localhost/vue-now-ui-dashboard-pro-laravel/laravel-json-api-pro/public/api/v1 VUE_APP_API_KEY= VUE_APP_IS_DEMO=

ghost commented 2 years ago

Hi Adrian,

Please check on GitHub and let me know where i am going wrong.

Regards: Pardeep Rawat

On Tue, 27 Sept 2022 at 13:03, Updivision Team @.***> wrote:

Hello,

I still cannot see them could you please send the files from the github issues link?

1

https://github.com/creativetimofficial/ct-vue-now-ui-dashboard-pro-laravel/issues/1

Thank you.

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

teamupdivision commented 2 years ago

Hello,

It looks like you do not have client_id and Client_secret set up in env can you please add them?

Also, can you install passport an let us know if it works?

If that does not work can you please let us know if the issue is present in postman as well or just frontend?

Thank you.

ghost commented 2 years ago

Hi Adrian,

Thanks For your quick response.

Yes I have run the passport install command and after that, I had the client_id and Client_secret, but I have not any idea where and how to add them in the env file. can you please just let me know how can I add those credentials to the laravel env file?

PFA

Thanks Regards localhost-127-0-0-1-laravelvue_db-oauth_clients-phpMyAdmin-5-2-0

Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

Go ahead and change the env file code with this :

APP_NAME=Laravel APP_ENV=local APP_KEY=base64:H3mz38XaVPiXAbzu6EvBvlGq+2+unZNcR+FVJnGHY5k= APP_DEBUG=true APP_URL= LOG_CHANNEL=stack DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravelvue_db DB_USERNAME=root 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=null MAIL_PASSWORD=null MAIL_ENCRYPTION=null 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}"

CLIENT_ID=2 CLIENT_SECRET=rGC...( Copy Values from secret column row id 1)

Please let me know if that worked.

ghost commented 2 years ago

Hi Adrian,

image

Here is the error which i am getting before and now as well

Here is my code snippet of env file

image

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Adrian,

Is there anything you need from my side? I am available now to provide any information.

Thanks

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

Could you please clarify if it works in postman?

Thank you.

ghost commented 2 years ago

Hi Adriane,

I didn't know how to run this on postman.

Could you please make steps on how can I do that? what credentials and what link I have to try on postman. https://drive.google.com/file/d/1J8dGvDvTJ6OnCQBqZ6UzNexuOaAkMoHe/view?usp=sharing

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

Please find the link with the full collection of endpoints from postman -> https://www.postman.com/updivision/workspace/updivision-s-public-workspace/collection/8138626-e8410c91-d19e-48d2-915d-e458c1db78b2

You can also find some help with the setup here --> https://learning.postman.com/docs/sending-requests/managing-environments/

You just need to set up the local environment cu the api_url and access_token variables.

ghost commented 2 years ago

Hi Adriane,

I didn't know now what to do. I am able to run the login API and it's giving me the below o/p

https://drive.google.com/file/d/1dgNiDOIURVup3XzQnInED8JYVMkBon7K/view?usp=sharing

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

Could you please check the console and send us what issues you find or a screenshot?

ghost commented 2 years ago

Hi Adriane,

PFA https://drive.google.com/file/d/1v2G38RyQHrskLayfgKT2VXuMFqD0usC4/view?usp=sharing https://drive.google.com/file/d/1h23qm2w744C3oRQ1WIQolTzTQbVjbQ7p/view?usp=sharing

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

My apologies i wasn't clear enough. I mean the Frontend console, you get there by right clicking in the page selecting "inspect" and selecting console in the menu that appears. Please send us what appears after you click submit. Also could you send us the Paypload from the network?

ghost commented 2 years ago

Hi Adriane,

PFA,

image

Also, thanks for your support will connect tomorrow again as it's my working hour over today. I hope you will understand.

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

Understood. For tomorrow you should turn on api backend projects.

ghost commented 2 years ago

Hi Adriane,

I hope you are doing well.

Thanks for your understanding should we start? and what I have to do today?

Regards: Pardeep Rawat

eugentudorache commented 2 years ago

Hi Pardeep,

Please read the above reply. Your backend API project is not turned on, please turn it on.

Best

-- Eugen Tudorache Technical Director & Co-Founder m: +40 733 926 398 e: @. @. w: www.updivision.com [http://www.updivision.com/] On 28/09/2022 6:57:27, Pardeeprawat001 @.> wrote: Hi Adriane, I hope you are doing well. Thanks for your understanding should we start? and what I have to do today? Regards: Pardeep Rawat — Reply to this email directly, view it on GitHub [https://github.com/creativetimofficial/ct-vue-now-ui-dashboard-pro-laravel/issues/1#issuecomment-1260353095], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC4GU4G2KTULHBZM2KN23DLWAO62PANCNFSM6AAAAAAQVSBCSE]. You are receiving this because you are subscribed to this thread.Message ID: @.>

ghost commented 2 years ago

Hi Eugene,

I didn't get your point. How can I turn the backend API Project? Please guide me on how to do that.

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Eugene,

I Have tried and tested the register API and it's working for me. But when I tried to log in with those credentials it's giving me the same error. here is the attached screenshot for registering API. image

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Adriane,

Any feedback?

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Adrian,

I didn't get your point. How can I turn the backend API Project? Please guide me on how to do that.

Any feedback?

Regards: Pardeep Rawat

On Tue, 27 Sept 2022 at 19:19, Updivision Team @.***> wrote:

Hello,

Understood. For tomorrow you should turn on api backend projects.

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

teamupdivision commented 2 years ago

Hello,

You will turn the backend API the same way you did the postman.

Does register work from the Frontend?

ghost commented 2 years ago

Hi,

No, not from the front end. Can you please guide me how can I do with backend API as I haven't any idea about it.

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

The backend API should already be on since it worked for postman.

Could you please send us another screenshot from the console with all the errors that appear?

Thank you.

teamupdivision commented 2 years ago

Hello,

Also did you make any changes to the project?

ghost commented 2 years ago

No, I haven't changed anything expect the env files.

PFA image

Regards: Pardeep Rawat

ghost commented 2 years ago

Hello

Attached screenshot of chrome as well image

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Adrian,

I hope you are doing well!

Any feedback regarding the above? I am eagerly waiting for your response.

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

We're still investigating the issue, we will follow up soonest.

ghost commented 2 years ago

Okay Thanks,

I hope I will soon get good feedback from you.

Regards: Pardeep Rawat Regards: Pardeep Rawat

On Thu, 29 Sept 2022 at 13:14, Updivision Team @.***> wrote:

We're still investigating the issue, we will follow up soonest.

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

teamupdivision commented 2 years ago

Please go to package.json and update "vue-authenticate": "^1.4.1" to "vue-authenticate": "1.4.1" After that, run npm update

ghost commented 2 years ago

Hi

I have updated and still getting same issue . here is the attached screenshot of my console.

image Regards: Pardeep

teamupdivision commented 2 years ago

Please try deleting node_modules and package.lock then do npm install

ghost commented 2 years ago

Hi,

deleting node_modules and package.lock then do npm install:: Done also run the dev command after that.

Found the Below Error when run the npm dev command, and still getting the same error when try to run login.

image image image

Regards: Pardeep Rawat

ghost commented 2 years ago

Hi Adrine,

Good Morning, I hope you doing well.

Is there any way I can provide you with my vue laravel pro project and you run it on your local machine and send me all the necessary steps I need to follow after that? I think this can help me to get rid of this.

Regards: Pardeep Rawat

eugentudorache commented 2 years ago

Hello,

I don't understand - why would you send us the project? Did you make any changes to it? If not there is no reason to send it.

Thank you

-- Eugen Tudorache Technical Director & Co-Founder m: +40 733 926 398 e: @. @. w: www.updivision.com [http://www.updivision.com/] On 30/09/2022 7:41:24, Pardeeprawat001 @.> wrote: Hi Adrine, Good Morning, I hope you doing well. Is there any way I can provide you with my vue laravel pro project and you run it on your local machine and send me all the necessary steps I need to follow after that? I think this can help me to get rid of this. Regards: Pardeep Rawat — Reply to this email directly, view it on GitHub [https://github.com/creativetimofficial/ct-vue-now-ui-dashboard-pro-laravel/issues/1#issuecomment-1263094992], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AC4GU4FKT66RCOOD5TIVA3DWAZVPHANCNFSM6AAAAAAQVSBCSE]. You are receiving this because you commented.Message ID: @.>

ghost commented 2 years ago

Hi Eugene,

I get it but my main reason is to run this project asap, as I am running out of time.

Thanks & Regards Pardeepb Rawat

teamupdivision commented 2 years ago

We cannot help you unless you reinstall it and send us the process screen cast.

ghost commented 2 years ago

Hi Adriene,

I had done all the necessary processes and now it's working to me now could you help me build on the production server?

I am mentioning all the structure of my project because I am confused between paths.

Main Server: https://secure.voxara.net/

Sub Folder: https://secure.voxara.net/laravelvue/ #In the laravel folder I have placed two projects one for laravel and the other for vue.

Laravel Project: https://secure.voxara.net/laravelvue/laravel-json-api-pro/public/

https://secure.voxara.net/laravelvue/laravel-json-api-pro/public/index.php/api/v1

Vue Project: https://secure.voxara.net/laravelvue/vue/index.html

Another Issue: When I do a hard refresh on the register, login, and dashboard it gives me a 404 not found URL. Is there any way I can set the global path for all the URLs? eg: https://secure.voxara.net/laravelvue/vue/register

Note: I have made some changes regarding app.js file the which is present in vue project. I am telling you just for your reffernce. path: /laravelvue/vue/js/app.6ebee391.js

Regards: Pardeep Rawat

On Mon, 3 Oct 2022 at 15:35, Updivision Team @.***> wrote:

We cannot help you unless you reinstall it and send us the process screen cast.

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

teamupdivision commented 2 years ago

Hello,

If you need help with any of your projects, we're happy to help. We do custom development for start-ups and companies across the globe (you can check out our portfolio here https://updivision.com/portfolio and some happy clients over here https://updivision.com/testimonials). Don`t hesitate to drop us a line at office@updivision.com or by using our contact form (https://updivision.com/contact).

ghost commented 2 years ago

Hi Adriene,

I hope you doing well.

I have one question for you can you please look at this issue and why I am getting this issue?

Items API: http://localhost/final-laravel-vue/laravel/public/api/v1/items

When I am trying to access the above endpoint it gives me an error. Error attached in the screenshot https://drive.google.com/file/d/1a2rH04vBNM0XiY2S-ILHLo0AWZfwT05i/view?usp=sharing

Also after that, I tried to run the endpoint in postman, and here it is also giving me an unauthenticated error. https://drive.google.com/file/d/1zyOL47-o72seX8ayYHQ9tU9no3rCxLCV/view?usp=sharing

Also, one thing I am not aware of that and that is the Bearer Token. I don't know how to set this. please tell me the steps of setting the bearer token.

Thanks Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

In the Postman collection witch you can find here --> https://www.postman.com/updivision/workspace/updivision-s-public-workspace everything is set up including the Bearer Token.

You are getting Unauthenticated means you are trying to access a route unlogged.

Thank you.

ghost commented 2 years ago

Hi Adriene,

I hope You are doing well.

May I know why I am getting this error? image

I cannot see the Item List, even my Examples Tab in the left panel is not loaded completely? image

Regards: Pardeep Rawat

teamupdivision commented 2 years ago

Hello,

It looks like you are getting error 401, which means that you are logged in as a user not authorized to view items.