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

All Questions

Tagged with
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
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
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
73 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
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
0 votes
1 answer
47 views

Mongoose CastError: Cast to ObjectId failed for Twitter ID (type string)

I’m working on a content syndication project where I’m implementing Twitter authentication using Passport.js and Mongoose. The authentication flow works up to the point of deserializing the user. I’m ...
Belmin's user avatar
  • 1
0 votes
1 answer
45 views

Login route returns "Cannot POST /login" - implementing Passport in MERN

I am trying to implement Passport into my MERN application, registering users and all other routes work but whenever I hit the /login POST route I get Cannot POST /login (see image below). This only ...
jc22920's user avatar
  • 348
0 votes
0 answers
25 views

NODE + PASSPORT + GOOGLE STRATEGY: req.user not being persistent and connect.sid not being sent in production environment

I'm working on a MERN stack project and I'm facing this issue where my req object is not being persistent and holding the req.user after it has been authenticated. when the /google/callback enpoint is ...
Amaan's user avatar
  • 5
0 votes
0 answers
28 views

Google OAuth Refresh Token Undefined

I realize that this has come up several times, but I have tried every solution I could find, and my refreshToken is still coming up as undefined. I make sure that I delete my app's 3rd party access. ...
threehappypenguins's user avatar
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 ...
quentinkrammer's user avatar

15 30 50 per page
1
2 3 4 5
364