loopbackio / loopbackio/loopback-next

jwt-example doesn't work with mysql

Open
#7,489 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Examples
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

Hi I'm testing the jwt - todo sample and it's working over memory database but when I use it with a Msql database I have this response

"error": {
"statusCode": 422,
"name": "ValidationError",
"message": "La instancia User no es válida. Detalles: password can't be blank (value: undefined).",
"details": {
"context": "User",
"codes": {
"password": [
"presence"
]
},
"messages": {
"password": [
"can't be blank"
]
}
}
}
}

BUT I have made the request with password field

{
"email": "tafa@kk.eg",
"password": "123456789854"
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the jwt-todo sample with MySQL and compare its behavior with the in-memory database using the request shown in the issue. Inspect the sample's User handling and MySQL setup to determine why the submitted password is reported as undefined. Done when the same request validates successfully with MySQL and the sample's authentication flow works.

Written by the indexing model from the issue text.

Assessment

Tech stack
mysql, typescript
Domain
authentication, backend, database
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.