Skip to content
Advertisement

Tag: passport.js

Getting Error while posting a request, ValidationError: TodoTask validation failed: user: Cast to ObjectId failed for value

i am getting an error while trying to post a todo to the database. ValidationError: TodoTask validation failed: user: Cast to ObjectId failed for value My function for posting the request : Schema is defined as : Answer Since the user property is defined as a ref you should just store the _id in it: When retrieving user’s information you will

Getting error [ERR_INVALID_ARG_TYPE] while trying to login

I’ve provided login/register system to my page, but I get an error I’ve been struggling with while trying to login: Looks like something here is the problem: passwordUtils.js or passport_log.js login post route When I console.log(user) it returns But after successful register it returns And in DB: Why there is hash and salt in user data after register, but not

Loopback passport-facebook for multiple user models

I’m using passport to authenticate users for my application using Facebook. In my application, I have 2 different users: customers and professionals (transitioning to “experts”). I followed the Loopback docs to implement the loopback-component-passport package and passport-facebook and have it working for my customers. Because I use custom User models, I followed this SO Post on how to get that

Advertisement