Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [passport.js]

Passport.js is authentication middleware for Node.js. Extremely flexible and modular, Passport can be unobtrusively dropped into any Express-based web application. A comprehensive set of strategies support authentication using a username and password, Facebook, Twitter and more.

-1 votes
0 answers
19 views

Passport.js Error Handling Instead of throwing the error into stdout

So I Have The Current Code For Authorization (and im probably going to merge login with signup): Strategy: const passport = require("passport") const { Strategy } = require("passport-local") const ...
AmirparsaDD's user avatar
1 vote
0 answers
17 views

How to implement login and registration module in node and react with passportjs

I want to know like there is a three pages login registration and home now I want like before signup or sign in user should not be able to access home page now how to implement that like normally and ...
techguy's user avatar
  • 11
0 votes
1 answer
32 views

passport.deserializeUser function never getting called

Passport's deserialization just does not work no matter what I do. This is my passport.js: const passport = require('passport'); const GoogleStrategy = require('passport-google-oauth20').Strategy; ...
hypedstan's user avatar
-1 votes
2 answers
25 views

Passport JS + React application internal 500 errro

I am creating a general chat application with react, and am stuck while trying to authenticate a user. The axios post request raises a 500 error that I cannot track anywhere. When I put in correct ...
Mac Pickle's user avatar
0 votes
0 answers
32 views

NPM passport issue

I am using NPM package passport router.get("/login", (req, res) => { res.render("users/login.ejs"); }); router.post( "/login", (req, res) => { ...
Sparsh Maheshwari's user avatar
0 votes
1 answer
18 views

Login Redirection Issue in Express.js with Passport Authentication

I am developing an Express.js application and facing a persistent issue with user authentication. Despite successful user registration and confirmed entries in the database, the login process does not ...
Ricardo Luna's user avatar
0 votes
1 answer
32 views

How to redirect to a specific path after authentication in Nest using Passport

I have an API backend implemented using Nest, and the app frontend is implemented using Angular. It implements authentication using Passport. The Angular app runs at http://localhost:2080, whereas the ...
Umar Farooq Khawaja's user avatar
0 votes
0 answers
14 views

Passport.js { message: 'Missing credentials' } error in Next.js

So I tried making the passport.js local strategy in Next.js using it's pages router (the app router can't work because NextResponse doesn't contain an .end() method like NextApiResponse). I have been ...
MD20M's user avatar
  • 1
0 votes
0 answers
23 views

Why is my Google social login working despite my app not being published?

I have implemented Google social login for my web application. Here are the steps I've taken so far: Created an OAuth 2.0 Client ID in the Google Cloud Console. Added my application's domains under &...
khem K's user avatar
  • 1
0 votes
0 answers
37 views

passport login issues in session

I'm having trouble with my passport. The login process went through without any issues, but the passport key has to be saved into the session and there is not req.user in the requset the initapp ...
Yossef Sabry's user avatar
0 votes
1 answer
27 views

How do I specify which HTTP method should be used in a redirect in my express application?

I have a NodeJS/Express application where I am using PassportJS for authentication. I have the following routes: router.get("/profile", isUser, (req, res) => { res.render("profile&...
Oscar R's user avatar
  • 452
0 votes
0 answers
22 views

How to Configure Google Auth Redirect URI for a Node.js Application on AWS EC2?

I'm currently deploying a Node.js application that uses Google OAuth 2.0 for authentication on an AWS EC2 instance. However, when users attempt to log in using Google, they receive an "access ...
ASHWIN C's user avatar
0 votes
1 answer
72 views

Getting "401 Unauthorized" when accessing protected route in Express.js with express-session and passport

I'm building a blob web application using Express.js where users can log in and access protected routes. I've set up session management using express-session and authentication with passport-local. ...
elclasico's user avatar
-1 votes
0 answers
17 views

Google oauth redirect URL is react routed page. How can I use passport.authenticate middleware to extract user info?

passport.use( new GoogleStrategy({ clientID:"xyz.apps.googleusercontent.com", clientSecret:"xyz", callbackURL:'http://localhost:5173/loggedin' }, ...
Shrikrishna Sawangikar's user avatar
0 votes
1 answer
33 views

Cookie not setting in Express with Passport JS

I am using Passport JS for authentication for my MERN app. I am trying to have routes that are protected so you must be authenticated. When I test the routes and /login in Thunder Client and then try ...
jc22920's user avatar
  • 348

15 30 50 per page
1
2 3 4 5
466