#Unable to Authenticate App Using Passport

16 messages · Page 1 of 1 (latest)

river tinsel
#

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

real cloakBOT
#

: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.

quartz jewel
#

What does your request look like?

river tinsel
#

Sorry I do not understand, what you're saying

#

{ email: 'ap3135198@gmail.com', password: '12345' }
This is what I'm getting in the body

quartz jewel
#

Change email to username and it'll work

#

Oh, also, your strategy's validate should have two parameters, not a single object

river tinsel
#

WHAT THE..........

#

How?

quartz jewel
#

That's how passport local works

river tinsel
#

it's working

#

but how?
What if I have to enter email instead of username?

quartz jewel
#

It requires username and password to be properties of the body or query parameters of the request

quartz jewel
river tinsel
#

Thanks btw