loopback4-starter: Login Problem

I’m testing and can’t log in. But I don’t know if I’m doing the right thing. as I read. I must first go to

auth/login

with these parameters

{
  "client_id": "webapp",
  "client_secret": "saqw21!@",
  "username": "super_admin",
  "password": "test123!@#"
}

and that returns this code to me.

{ “code”: “eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IndlYmFwcCIsInVzZXJJZCI6MSwiaWF0IjoxNTg2OTU3MzMzLCJleHAiOjE1ODY5NTc1MTMsImF1ZCI6IndlYmFwcCIsImlzcyI6Im1mZ3FmIiwic3ViIjoic3VwZXJfYWRtaW4ifQ.wgHgBirDz1T9YW1pG133XGBwJRM7q61GsgfCRrpC4ws” }

Then I must go to

auth/token

with these parameters

{
  "code": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJZCI6IndlYmFwcCIsInVzZXJJZCI6MSwiaWF0IjoxNTg2OTU3MzMzLCJleHAiOjE1ODY5NTc1MTMsImF1ZCI6IndlYmFwcCIsImlzcyI6Im1mZ3FmIiwic3ViIjoic3VwZXJfYWRtaW4ifQ.wgHgBirDz1T9YW1pG133XGBwJRM7q61GsgfCRrpC4ws",
  "clientId": "webapp",
  "username": "super_admin"
}

so that it gives me the true token but it returns a 401.

{
  "error": {
    "statusCode": 401,
    "name": "UnauthorizedError",
    "message": "Invalid Credentials"
  }
}

Can someone tell me what I’m doing wrong? thank in advance @samarpanB

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 20 (6 by maintainers)

Most upvoted comments

Yes. We are working on upgrading to latest. Give us few days time.