I’m a noob. I have a question. I’m using passport-google-oauth20 as you can clearly see , this rout ( app.get() ) has 3 parameters, and this is the first time I used something like this, can anyone please explain the logic/theory behind this ? normally I use but in this special case, there are 3 parameters. can you provide me
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
Everything is fine but logout doesn’t work – (Cannot POST /logout)
My logout doesn’t work and I’m trying to figure out why. When I click on submit it says : Cannot POST /logout I have used passport to check for data from the users and I have create route for each webpage. I have tried many things but I think the problem may come from the form on the action side.
Passport.js Multiple login system is not working correctly
I am getting a weird error as all of my login system are working correctly which include local login in system and Google and Facebook login. The problem arose when I try to try to register with google when I have already register the Facebook account and I try to register Google account it gives E11000 duplicate key error collection
Redirecting to previous page in Passport.js after authentication (not duplicate) Node.js
I am trying to redirect back to the page when I am redirected to log in. I am using Passport and connect-ensure-login, and the login works, however, it gets annoying having to re-click the link (if you are not logged in, it redirects you to the home page, but the link has a query string). Is there a way to
Azure AD authentication failed using idToken or accessToken. Which one should I use?
In the azure active directory documentation it states: idToken: id_tokens are sent to the client application as part of an OpenID Connect flow. They can be sent along side or instead of an access token, and are used by the client to authenticate the user. accessToken: Access tokens enable clients to securely call APIs protected by Azure I am using
Mongoose schema Cannot read property ‘password’ of undefined
I was trying out passport local authentication by following a tutorial. Everything seems fine but I’m getting this error when I make a request using Postman: Here is my user schema: And this is my server.js file: Here is the Passport strategy I’m using: I’ve no idea whats going wrong to be honest. please help. **Update:**The signup route and signup
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
React Node Unable to pass cookie to the browser (crocs error)
For some reason I am unable to store cookie in my browser. This is the first time I am working with React And NodeJS My React application is working on localhost:3000 and NodeJS application on localhost:8080 The Git repository for the same happens to be this So, I am successfully able to login, store the credentials in DB and probably