sourcefuse / loopback4-starter

Loopback 4 starter application. Multi-tenant architecture supported. Authentication, Authorization, Soft deletes, environment vars, Audit logs, included.
MIT License
158 stars 59 forks source link

Login not work #42

Closed ggmac23 closed 4 years ago

ggmac23 commented 4 years ago

I install the demo everything work fine, but when i try to login from the explorer it response with this error:

To Reproduce Steps to reproduce the behavior:

  1. Go to http://[::1]:3000/explorer/#/LoginController/LoginController.login
  2. POST /auth/login
  3. Send : { "client_id": "webapp", "client_secret": "saqw21!@", "username": "super_admin", "password": "test123!@#" }
  4. See error: { "error": { "statusCode": 401, "name": "UnauthorizedError", "message": { "name": "error", "length": 119, "severity": "ERROR", "code": "42P01", "position": "194", "file": "parse_relation.c", "line": "1173", "routine": "parserOpenTable" } } }

Can you help me?

fgvicente commented 4 years ago

Hi. could you solve it I have the same problem

samarpanB commented 4 years ago

It seems to be error with migration scripts. Let me check that. Give me some time. Meanwhile, can you please confirm if you have run the migration scripts alright?

fgvicente commented 4 years ago

Thanks @samarpanB ... the migrate had run badly

samarpan-b commented 4 years ago

This should have been fixed with latest updates. Closing it hence.

personwholearn commented 4 years ago

I have the same issue right now with the last update! , please help me the error { "error": { "statusCode": 401, "name": "UnauthorizedError", "message": { "name": "error", "length": 185, "severity": "ERROR", "code": "42P01", "position": "194", "file": "d:\pginstaller_12.auto\postgres.windows-x64\src\backend\parser\parse_relation.c", "line": "1173", "routine": "parserOpenTable" } } }

samarpanB commented 4 years ago

Can you please check if you have run all the migration scripts?

personwholearn commented 4 years ago

@samarpanB thanks for your response :) yes i checked many times in DB, i followed your steps and , ( i clone your project -> npm i -> change .env -> db-migrate up -> npm start ) and i go to "login/auth" and enter { "client_id": "webapp", "client_secret": "saqw21!@", "username": "super_admin", "password": "test123!@#" }

Screenshot (158)

but the error still

"error": { "statusCode": 401, "name": "UnauthorizedError", "message": { "name": "error", "length": 185, "severity": "ERROR", "code": "42P01", "position": "194", "file": "d:\pginstaller_12.auto\postgres.windows-x64\src\backend\parser\parse_relation.c", "line": "1173", "routine": "parserOpenTable" } } }

Screenshot (159)

personwholearn commented 4 years ago

i also changes postgresdb 12 to 10 , i also update the project whether "lb4 rest-crud"or npm update ,i made many db-migrate up and db-migrate down but still in the same issue , i used windows 10 ,npm -v is 6.14.6 ,node -v is v12.18.0 please help me😭😭😭🤯🤯

personwholearn commented 4 years ago

can anyone help me ?

samarpan-b commented 4 years ago

Can you share your .env ? Hide the DB host and password from there.

personwholearn commented 4 years ago

we solved in the ticket of https://github.com/sourcefuse/loopback4-starter/issues/54