I've seen any possible videos on Youtube and google to get authentication done, I done as same as them, but why why why, it isn't working for me? please help
#Unable to Authenticate App Using Passport
16 messages · Page 1 of 1 (latest)
:warning: Please do not screenshot code as it causes a number of issues:
- Ease of assistance: if someone wants to copy your code and correct it, they cannot. Making it easy for people to help you is in your best interests.
- Editorializing: it's common to try to make images small, which means you're likely to crop out code relevant to your issue
- Accessibility: wide images can be hard to read on mobile devices, and are impossible for screen readers.
- Legibility: you cannot read screenshots of code directly, instead you have to open them in an enlarged context.
- Bandwidth usage/clutter: some of our members use metered connections, and it is wasteful for them to download images of a text.
For a small amount of code, please use a code-block.
What does your request look like?
Sorry I do not understand, what you're saying
{ email: 'ap3135198@gmail.com', password: '12345' }
This is what I'm getting in the body
Change email to username and it'll work
Oh, also, your strategy's validate should have two parameters, not a single object
That's how passport local works
It requires username and password to be properties of the body or query parameters of the request
Then tell passport that in the configuration. { usernameField: 'email' } passed to the super constructor
Okay, is there any docs on how to do that?
Thanks btw