Questions tagged [passport-local]
Authentication strategy for Passport JS using a username/email and password. Passport JS is authentication middleware for Node.js
passport-local
865
questions
0
votes
1
answer
32
views
Express request does not inlcude user after passport (local strategy) authentication
Question: I try to authenticate http requests via username and password. The authentication seems to work. But for some reason the user data is not available inside the express routes. Related ...
0
votes
0
answers
27
views
Issue in Authentication using Passport JS
What is the issue? I am signing in and User using Passport JS is stored in mongoDB, but after logging in authentication is failed !! I am using 2 different users (teacher and parent). Is there any ...
0
votes
0
answers
35
views
Can Anyone Tell Me What I Am Missing Or What I Am Doing Wrong?
The problem is that data is not getting stored in database, getting an error TypeError: Cannot read properties of undefined (reading 'Name')
this is my signup page code
const onSubmit = async (data) =&...
0
votes
0
answers
27
views
PassportJS login problem with failureRedirect: '/auth/login'
I have a project where I am making a login system with passport.
I use nodejs and mysql. What happens is when i enter info and press login, it just failureRedirect: '/auth/login' without any logs.
...
0
votes
1
answer
43
views
Nest can't resolve dependencies of the AuthService
Error in NestJS: "Nest can't resolve dependencies of the AuthService (?, JwtService)."
I am new to NestJS and I am trying to implement authentication with NestJS using JWT Token. However, ...
0
votes
0
answers
28
views
The "local" function in passport.authenticate is not being invoked for some reason
const express = require('express');
const jwt = require('jsonwebtoken');
const passport = require('passport');
const localStrategy = require('passport-local').Strategy;
const router = express.Router()...
0
votes
0
answers
29
views
How to solve user.get is not a function error?
I am trying to authenticate user login with the passport authenticate method but it is not authorizing the user to login despite having the correct login credentials. When I submit the form, I get a ...
0
votes
1
answer
85
views
Nest can't resolve dependencies of the UserService (?). Please make sure that the argument "UserRepository" at index [0]
I am trying to develop a login flow using passport, but I am getting the following error.
ERROR [ExceptionHandler] Nest can't resolve dependencies of the UserService (?). Please make sure that the ...
0
votes
0
answers
14
views
passport js middleware will always redirect me to the faliure route
please help me find the issue with my passport.js setup i swear i will never use passport again just please help me this time
passport.js
const passport = require('passport');
const mongoose = require(...
0
votes
0
answers
18
views
Not being able to persist logged in session using PassportJS
I have implemented authentication system in my MERN application using Passport.js.The application cannot seems to persist the logged in session. When I reload the page, I get logged out automatically. ...
0
votes
0
answers
29
views
postman request doesnt show results and stuck on sending request
the problem may reside either in the /login route or in the local strategy but a post request to /login makes postman send infinitely and no results come back. i've searched a lot but there doesn't ...
1
vote
1
answer
28
views
Continous Unuathorised message response on using authguard in nest .js
I am trying to use the authguard here in nest js but i am getting this unauthorized error constantly , let me share all the codes here
//auth service
import { Injectable, UseFilters } from '@nestjs/...
0
votes
0
answers
63
views
Passport js "isAuthenticated()" doesn't work as expected. But it does work with postman
So, I have a simple Node Express server and I am handling authentication with Passport.js. I am struggling when trying to make it work correctly.
Here's the setup:
I have a React frontend where users ...
0
votes
1
answer
67
views
Node.js express application: why do I get a 404 POST error?
I want to build a node.js application with express but face this problem: when I try to login and my index.ejs sends a post request to my server I get a 4040 error. I am a programming novice and hope ...
0
votes
0
answers
14
views
MongooseError when using passport to authenticate user
Learner here and I got stuck with an error when learning and building a basic login route in JS using passport. Error is MongooseError: Model.findOne() no longer accepts a callback. I'm getting this ...