Closed Derrreks closed 2 years ago
Just cloned the repo, navigated to sample/19-auth-jwt
, and npm i
and npm run start:dev
, and made a curl to /auth/login
with -d 'username=john&password=changeme'
. Got an access token back no problem. The example runs fine.
Please provide a minimum reproduction repository.
me too.
(Linux)
Is there an existing issue for this?
Current behavior
The sample code specified for add Passport authentication errors out when using the example specified in the docs with the following error:
I have tested this both by following the docs to create from scratch and by copying the full example code directly.
Minimum reproduction code
N/A
Steps to reproduce
npm install
npm run start
curl -X POST http://localhost:3000/auth/login -d '{"username": "john", "password": "changeme"}' -H "Content-Type: application/json"
(The example given: https://docs.nestjs.com/security/authentication)Expected behavior
It should return a token!
Package
Other package
No response
NestJS version
No response
Packages versions
N/A
Node.js version
No response
In which operating systems have you tested?
Other
No response