Skip to content

Passport Error #1

Open
Open
@Asher978

Description

@Asher978

Hey..
came around this repo and poked around a bit.
Currently no matter what password you provide, backend will auth you in ....

i think the issue is here....

const passwordMatch = user.comparePassword(password); // isnt this a promise... ?

// so maybe .... changing it to 
const passwordMatch = await user.comparePassword(password);

    if (!passwordMatch) {
      return done(null, false, 'Incorrect password.');
    }

    return done(null, user); 

// and changing this line to not return fixes things. 

done(null, user)

Thoughts....?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions